-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Check for non-blocked status when determining isMergeable #6998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| mergeabilityResolved = true; | ||
| isMergeable = data.mergeable; | ||
| console.log(`Merge information for #${pullRequestNumber} - mergeable: ${data.mergeable}, mergeable_state ${data.mergeable_state}`); | ||
| isMergeable = data.mergeable && data.mergeable_state !== 'BLOCKED'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like in the images the value is lowercase, should we uppercase the data.mergeable_state value to ensure the comparison is exact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with @roryabraham's suggestion which should handle this
.github/actions/isPullRequestMergeable/isPullRequestMergeable.js
Outdated
Show resolved
Hide resolved
.github/actions/isPullRequestMergeable/isPullRequestMergeable.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
roryabraham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good, but I think we might need to update the unit tests now
|
Sorry looks like a jest test failed, looking into it now. |
|
Jest tests should be passing now, just waiting on E2E for the ✅ |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by @roryabraham in version: 1.1.25-2 🚀
|
Details
Adds a check for the
mergeable_stateof a PR to make sure it is notBLOCKED. This is the state that a PR can get in with unverified commits, messing up the deploy process.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/190589
Tests
mergeable_stateof"clean", "has_hooks", "unknown", "unstable", so this will prevent auto-merge from silently failing in theBLOCKEDstateQA Steps
N/A