-
Notifications
You must be signed in to change notification settings - Fork 353
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
Use new build status API #621
Comments
According to jenkinsci/atlassian-bitbucket-server-integration-plugin#401 (comment), the newer API also takes the Git ref name as a parameter, and Bitbucket uses that for deciding whether to show the build status in a pull request. Furthermore, if the source branch of a pull request is used as this ref, then the build status must be posted to the source repository of the pull request, not to the target repository. |
It's not clear to me the difference between bitbucket-branch-source-plugin and atlassian-bitbucket-server-integration-plugin |
bitbucket-branch-source-plugin supports both Bitbucket Data Center and Bitbucket Cloud. atlassian-bitbucket-server-integration-plugin does not support Bitbucket Cloud, but has been more proactive in supporting new features of Bitbucket Data Center. Its support for Jenkins APIs has been gradually catching up with bitbucket-branch-source-plugin. |
ok, I would just a confirm. Pardon at this point a question is raising in my mind...why we are spending a double effort to provide the same feature? |
I can confirm the same behaviour of the API for Bitbucket Cloud: Anyway this is the way I would follow to resolve this kind of bug |
Currently the API in use is a POST |
This issue is for Bitbucket Server and Data Center, not Bitbucket Cloud. |
The same issue affect also bitbucket cloud. The API has the same behaviour, branch jobs attach build status to a commit without a refname will cause in PR page show twice builds. Will applied the same solution both for Server (deprecated), Data Center and Cloud |
What feature do you want to see added?
Use the new build status API that was added in Bitbucket Server 7.4. It differs from the old API in the following ways:
The old API is at /rest/api/1.0/build-status/latest/commits/{commitId}, and the new API is at /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds.
The new {projectKey} and {repositorySlug} parameters would complicate fixing JENKINS-66620; see Send build completion notification for pull requests merged after build start #472 (comment).
The user of the old API only needs to be LICENSED. The user of the new API needs REPO_READ permission.
Build statuses that were added via the new API can be deleted later.
The plugin could then be changed to delete build statuses of aborted builds, as suggested in Send build completion notification for pull requests merged after build start #472 (comment).
Upstream changes
The text was updated successfully, but these errors were encountered: