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

Error: Pull request is in clean status #12

Closed
Tracked by #7
Bullrich opened this issue Sep 28, 2023 · 0 comments · Fixed by #13
Closed
Tracked by #7

Error: Pull request is in clean status #12

Bullrich opened this issue Sep 28, 2023 · 0 comments · Fixed by #13
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Bullrich
Copy link
Collaborator

If all the checks have been completed and the PR is ready to review, the action will fail when trying to enable auto-merge with the error Pull request is in clean status.

To solve this, we can use the mergePullRequest GraphQL endpoint instead if auto-merge is unavailable.

@Bullrich Bullrich added the bug Something isn't working label Sep 28, 2023
@Bullrich Bullrich added this to the Version 1.0.0 milestone Sep 28, 2023
@Bullrich Bullrich self-assigned this Sep 28, 2023
@Bullrich Bullrich linked a pull request Sep 28, 2023 that will close this issue
Bullrich added a commit that referenced this issue Sep 28, 2023
There is an issue that you can not enable `auto-merge` when a PR is
ready to merge.

For this situation, I have added a try/catch block where it evaluates if
the error contains the message `Pull request is in clean status`. If so,
it will use the
[mergePullRequest](https://docs.github.com/en/graphql/reference/mutations#mergepullrequest)
mutation to merge the PR directly.

This fixes #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant