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 missing version of PullRequest in request to Bitbucket server #479

Closed
philslab-ninja opened this issue Feb 16, 2019 · 1 comment
Labels
bug Something isn't working provider/bitbucket

Comments

@philslab-ninja
Copy link

When the merge is being done this error happens:

Automerging failed: making request "POST http://xxx:7990/rest/api/1.0/projects/xxx/repos/xxx/pull-requests/2/merge" unexpected status code: 409, body: {"errors":[{"context":null,"message":"You are attempting to modify a pull request based on out-of-date information.","exceptionName":"com.atlassian.bitbucket.pull.PullRequestOutOfDateException","currentVersion":1,"expectedVersion":-1,"pullRequest":{"id":2,"version":1,"title":"Testing Atlantis Automerge" (...)

Seems this only affects bitbucket server (on-prem) and seems to be fixable by first polling for the current PR version, then using that version in the merge call.

see: https://confluence.atlassian.com/bitbucketserverkb/bitbucket-server-rest-api-for-merging-pull-request-fails-792309002.html

Thanks so much!

@lkysow lkysow added the bug Something isn't working label Feb 16, 2019
@philslab-ninja
Copy link
Author

I have verified the fix on our infrastructure. Thanks!

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

No branches or pull requests

3 participants