Check for non-blocked status when determining isMergeable - #6998
Merged
Conversation
AndrewGable
marked this pull request as ready for review
January 4, 2022 18:53
Jag96
reviewed
Jan 4, 2022
| 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'; |
Contributor
There was a problem hiding this comment.
It looks like in the images the value is lowercase, should we uppercase the data.mergeable_state value to ensure the comparison is exact?
Contributor
Author
There was a problem hiding this comment.
Updated with @roryabraham's suggestion which should handle this
roryabraham
previously approved these changes
Jan 4, 2022
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
roryabraham
approved these changes
Jan 4, 2022
roryabraham
requested changes
Jan 4, 2022
roryabraham
left a comment
Contributor
There was a problem hiding this comment.
Code changes look good, but I think we might need to update the unit tests now
Contributor
Author
|
Sorry looks like a jest test failed, looking into it now. |
Contributor
Author
|
Jest tests should be passing now, just waiting on E2E for the ✅ |
roryabraham
approved these changes
Jan 4, 2022
Jag96
approved these changes
Jan 4, 2022
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
21 tasks
Contributor
|
🚀 Deployed to staging by @roryabraham in version: 1.1.25-2 🚀
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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