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

Automerge fails on some PRs when there are multiple PRs being merged in very short period of time #176

Closed
2 tasks done
Ben10k opened this issue May 14, 2024 · 2 comments · Fixed by #181
Closed
2 tasks done

Comments

@Ben10k
Copy link
Contributor

Ben10k commented May 14, 2024

Description

Sometimes GitHub rejects the api call to merge the PR.

Expected Behaviour

Failed PR should be retried a few (configurable) times with (preferably) an exponential delay.
Failure could still be logged as a warning

Actual Behaviour

Leaves the PR open and logs this message:

time="2024-05-14T15:32:53Z" level=error msg="Failed to merge PR: err=PUT https://api.github.com/repos/[REPO_OWNER]/[REPO_NAME]/pulls/4333/merge: 405 Base branch was modified. Review and try the merge again. []" prNumber=4331 repo=[REPO_OWNER]/[REPO_NAME]

Affected Version

v0.1.9

Steps to Reproduce

Run telefonistka bump-regex --auto-merge ... in a loop on the same repository.

Checklist

@Oded-B
Copy link
Collaborator

Oded-B commented May 14, 2024

Sounds good.
I think we should only retry on 405s (and 5XX?), the rest doesn't seem relevant:
https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#merge-a-pull-request

@Ben10k
Copy link
Contributor Author

Ben10k commented May 14, 2024

I agree. I'll start working on it in the upcoming weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants