Bitbucket pull request builds seem incompatible with Bitbucket’s own pull request model
I have been experimenting with pull request builds for Bitbucket repositories.
I found that AppVeyor’s pull request support is very sensible. The build actually performs a git merge matching what Bitbucket would do (if it is configured to do a merge commit (it is possible to configure Bitbucket to do --ff-only on merges among other things and I don’t think I see AppVeyor implementing this) and assuming the auto-merge matches what Bitbucket would do). This way, the build is performed on the hypothetical result of the merge instead of on the unmerged source branch. This tries to protect the user from situations where the source branch can succeed but the merge results would fail.
Also, these pull request builds will occur for the target repository whenever a pull request is made. This means that AppVeyor does not need to be set up to build commits on the source repository in a cross-repository pull request scenario. This is particularly useful for “one private repo” plans.
However, it appears that Bitbucket has no support for this. There is no concept of a pull request build status in the API except for an aggregation API which lists the all(?) of the build results from commits in the pull request. Bitbucket only lets you set the status of concrete, already-pushed commits themselves.
However, Bitbucket’s pull request GUI will show build statuses. The build statuses it shows are the ones associated with the last commit in the pull request. This means that, currently, the only way to get AppVeyor build results to show up on a Bitbucket pull request is to have AppVeyor set up on the repository and branch originating the pull request.
Getting Bitbucket’s pull request GUI to show the results of a pull request-initiated build has high value to me. And Bitbucket supports various branch restrictions including some which are meant to support use of CI such as AppVeyor. The options in question are:
- “Minimum number of successful builds for the last commit with no failed builds and no in progress builds”. This can be set to the number of distinct build keys from different external build systems that are integrated with Bitbucket. For a project integrating only with AppVeyor, I can set this to 1.
- “Allow automatic merge when builds pass”. This setting can be enabled to allow users to hit “Merge” before the build is complete which causes the PR to wait and automatically merge once the build is complete. This doesn’t make for a fully automated pull request experience, but it is one step toward that.
There is also one additional setting which does not show up in the documentation which I think makes a compromise possible. Note that I have attached a screenshot showing the “Edit a branch restriction” screen in Bitbucket demonstrating this additional setting:
- “Maximum number of commits behind destination branch”. Setting this to 0 means that the pull request can be resolved through a fast forward. If this check is passing, that means that the pull request can be satisfied with a fast forward. If the pull request is resolved with a fast forward, that means that file contents of the source commit will be identical to the file contents after performing the fast forward merge onto the target commit.
Is it possible for AppVeyor to support setting the build status of a pull request by setting the build status of the source commit? Is this something which used to work and then was broken by Bitbucket at some point? Is Bitbucket’s model just too broken to be worth supporting—e.g., AppVeyor’s access token might not even let it set a build status on the source repository due to ownership issues.
Given that AppVeyor supports pull request builds for Bitbucket, what is the use case for this if it isn’t something that Bitbucket supports? Is there a way to notify some external automation system beside Bitbucket that the PR build succeeded so that this external automation system can manipulate the PR by, say, checking off a checklist item or marking it as “reviewed by CI”?
I do need to do some searching around in Atlassian. I think Bitbucket should learn about PR-specific build statuses because that would be so useful. I have not looked too much. But I also do not expect Atlassian to move very quickly even if they do decide to support this eventually. So I am wondering if there is some direction or advice from the AppVeyor side of things on this.
Thanks!
-
スクリーンショット_2026-01-21_134229.png
87.7 KB
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 22 Jan, 2026 06:36 PM
Hello,
On Bitbucket’s side, there is no concept of a pull-request–scoped build status.
Bitbucket only supports attaching build statuses to commits, not to pull requests or to a synthetic “merge result”.
Because of that, AppVeyor’s only practical integration point with Bitbucket is to set the build status on a real commit SHA, which in the case of PRs is the HEAD commit of the source branch.
This implementation has its own limitations like PRs from forks.
If there is a Bitbucket API, we don't know about, that can improve the experience we could re-evaluate/improve its support.
2 Posted by nbrink on 22 Jan, 2026 06:45 PM
Thanks for your response!
Is AppVeyor trying to set the build status of the HEAD commit of the source branch after a PR build? When I trigger a PR build in AppVeyor, Bitbucket doesn't show a build on the source branch. In order for Bitbucket to show a build status on the PR, I have to set up the source repository as a new project in AppVeyor and trigger a non-PR build in AppVeyor.
I was wondering/hoping it would be possible for AppVeyor to add a configuration option so that when it receives a PR webhook and completes it, AppVeyor could set the build status of the source branch HEAD. Is this possible? If this is not possible, is there a way I could get some sort of callback from AppVeyor so that I could implement my own third-party automation to detect the PR build was successful and do some magic trickery to set a build status in Bitbucket myself?
Support Staff 3 Posted by Feodor Fitsner on 22 Jan, 2026 07:12 PM
Yes, it sets status of head commit of source branch, but as I noted it could be some challenge to get it work with forks (different source repository) - Bitbucket API is very limited.
There are webhook notifications which maybe used in custom workflows. These days the solution could be easily vibe-coded and hosted on Cloudflare workers.