Skip to content

Commit

Permalink
Allows automerging PRs in the 'unstable' state
Browse files Browse the repository at this point in the history
As outline in an [issue on
octokit](octokit/octokit.net#1763), the
`unstable` state is defined as "Failing/pending commit status that is
not part of the required status checks. Merging is allowed."

Running the "Auto Merge" workflow itself induces an `unstable` state as
it is a pending check that is not part of the required status checks.
This is different than the `blocked` state which is induced by running
one of the required status checks. Either way, a merge will only be
possible if all of the required checks have passed and so it should be
safe to allow the "Auto Merge" workflow to attempt to merge the PR given
an `unstable` state.
  • Loading branch information
Ryan Moran committed Jan 14, 2021
1 parent 8713329 commit 28bb6a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion implementation/.github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "::set-output name=mergeable_state::$(echo "${payload}" | jq -r -c .mergeable_state)"
- name: Merge
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' }}
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' || steps.pull_request.outputs.mergeable_state == 'unstable' }}
uses: paketo-buildpacks/github-config/actions/pull-request/merge@main
with:
user: paketo-bot
Expand Down
2 changes: 1 addition & 1 deletion language-family/.github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "::set-output name=mergeable_state::$(echo "${payload}" | jq -r -c .mergeable_state)"
- name: Merge
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' }}
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' || steps.pull_request.outputs.mergeable_state == 'unstable' }}
uses: paketo-buildpacks/github-config/actions/pull-request/merge@main
with:
user: paketo-bot
Expand Down

0 comments on commit 28bb6a1

Please sign in to comment.