You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[GH Actions] Request review of automerge PR if there is a merge conflict #1709
Typically, PRs that have the automerge label don't need to be manually reviewed by anyone. In those cases, we don't want to request a review. However, since we'll be using automerge PRs to CP PRs to staging and/or production, we'll have more cases where it can't be automatically merged because of a merge conflict. In these cases, we need to request a reviewer on the PR so that the reviewer can manually resolve the merge conflict.
Why is this important?
This will be a pre-requisite of our Expensify.cash CP flows.
Solution
If this step of the automerge workflow exits with a nonzero exit code, add pullerbear as a reviewer on the PR.
Proposed solution
To determine the mergeability of the PR, the mergeable field on the PR is a Boolean that indicates if the branch can be merged, and mergeable_state will indicate if it's clean, dirty, or unstable. So, I will improve the automerge workflow by checking if the PR is mergeable, and merge or request a review.
The Status API can also be used to mark a commit on the PR that will be used to request for manual review.
Alternate solution:
Add id for this step so that I can check the exitcode of the step to add pullbear as reviewer or not like this as suggested in the issue description.
@mikeattara I like your first solution that checks the mergeable field! Proposal looks good, but just for clarity the correct actor is Expensify/pullerbear, not pullbear
Update
Currently, all pull requests require at least one approving review to be merged so I added a check on the automerge workflow for mergeability and mergeable_state.
Approve pull request if there is no merge conflict.
Merge pull request if there is no merge conflict and mergeable state is clean.
NB: Expensify/pullbearer is automatically added as a reviewer for all pull requests.
Activity
attaradev commentedon Mar 10, 2021
Proposed solution
To determine the mergeability of the PR, the
mergeablefield on the PR is a Boolean that indicates if the branch can be merged, andmergeable_statewill indicate if it'sclean,dirty, orunstable. So, I will improve theautomergeworkflow by checking if the PR is mergeable, and merge or request a review.The Status API can also be used to mark a commit on the PR that will be used to request for manual review.
attaradev commentedon Mar 11, 2021
Alternate solution:
Add
idfor this step so that I can check theexitcodeof the step to addpullbearas reviewer or not like this as suggested in the issue description.roryabraham commentedon Mar 11, 2021
@mikeattara I like your first solution that checks the
mergeablefield! Proposal looks good, but just for clarity the correct actor isExpensify/pullerbear, notpullbearattaradev commentedon Mar 11, 2021
Alright. Thanks for the clarification @roryabraham
arielgreen commentedon Mar 11, 2021
Sending over an offer in Upwork now, @mikeattara .
attaradev commentedon Mar 11, 2021
Thanks. @arielgreen
attaradev commentedon Mar 16, 2021
Update
Currently, all pull requests require at least one approving review to be merged so I added a check on the
automerge workflowformergeabilityandmergeable_state.NB:
Expensify/pullbeareris automatically added as a reviewer for all pull requests.