Open
Description
Describe the bug
The current GitHubReview.state
type definition is "APPROVED" | "REQUEST_CHANGES" | "COMMENT" | "PENDING" | undefined.
But while trying to catch if a PR had any requested changes I found out that the state returned by GitHub is actually CHANGES_REQUESTED
.
To Reproduce
Steps to reproduce the behavior:
- Open a new PR;
- Ask someone to request changes on that PR;
- Inside your
dangerfile
check the return ofreviews.find((review) => review.state === 'REQUEST_CHANGES')
; - This will not return the review you are looking for;
- Now try
reviews.find((review) => review.state === 'CHANGES_REQUESTED')
; - This will return yourreview;
Expected behavior
GitHubReview.state
type should correctly reflect the expected strings from GitHub;
Screenshots
If applicable, add screenshots to help explain your problem.
Your Environment
software | version |
---|---|
danger.js | 11.2.8 |
node | v18.19.0 |
npm | 10.2.3 |
Operating System | MacOS |
Additional context
I've checked the most recent danger
releases and the latest 12.1.0
release still presents this issue.
Activity