Skip to content
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

Allows automerging PRs in the 'unstable' state #214

Merged
merged 1 commit into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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' }}
Copy link
Member

@sophiewigmore sophiewigmore Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there cases where 'clean' can still happen? From your description it seems like it would always be in the 'unstable' state since at this point the auto-merge workflow would be running.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue here is that the GitHub API is not consistent in what it returns. I believe there is some sort of race condition wherein sometimes it will return clean and other times it returns unstable. Both should be acceptable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh ok that's fair then

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