1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #8548 resolved

Better CI integration: Add a build status API for commits (BB-9631)

created an issue

Hi, It would be nice if Bitbucket supported one of Stash's features, which also GitHub has it, build status api for commits as described here: https://developer.atlassian.com/stash/docs/latest/how-tos/updating-build-status-for-commits.html

With this API, we could better integrate BitBucket with our current CI server.

Comments (146)

  1. Erik van Zijst staff


    Better integration with other Atlassian and non-Atlassian products one of our main priorities for the near future and while we have not worked out all the details yet, this will include better CI integration.

  2. Robert Jeppesen

    To be really useful, commits should be presented like on Github, that is in the same view as comments. You don't want to go to the 'Commits' tab just to see the build state.

  3. Johan Bergström

    Having the same functionality [on bitbucket] already available in stash would be an important addition to bitbucket -- both for repo owners that are about to approve this pull request as well as users taking part of the comments, where build info could be considered noise.

  4. Anonymous

    I just spent the last hour trying to figure out how to make jenkins do this, eventually coming to the conclusion that it wasn't a feature available in BitBucket. I assumed it was since I've seen it done with Stash. This really needs to be added.

  5. Johan Bergström

    Closing in on 6 months since last we've heard from bitbucket reps. Last time they said this was a main priority -- it would be nice to get an update as to where they stand now. A lot of third party CI's seems to be knocking on this door which affects my decision regarding where to host as a user.

  6. Eugene Krevenets


    I can't believe that bitbucket doesn't have such features - it is one of the most important for any repo with CI. Scratching their heads to invent new dev process which doesn't drive the team to a madness.

  7. Chesley Brown

    Hey guys, if anyone is using Codeship with Bitbucket and wishes they could have the codeship build status right in the pull request, I just took a few hours and coded this:


    Basically just flick an instance of this up on Heroku (free), follow the setup directions and then every time a new pull request is created it'll automatically put the Codeship Status Widget right in the pull request description for that specific branch.

    Will look like this:


    I couldn't wait any longer for Bitbucket to add proper CI integration and I realized that implementing it using Codeship's existing markdown widget would be very easy.

    If you have any questions, just post them on the repo and I'll try my best to improve the directions or fix bugs that you might find. Always happy to accept pull requests as well. :)

  8. Johan Bergström

    There's a Jenkins plugin that does similar stuff; but for me the problem is that there's really no conception of "build passed" other than human intervention (reading comments/description) or parsing. My business have set a deadline for when we're done with waiting since it's becoming vital to know. I don't think there's a big incentive for Atlassian to consider this bug though -- there's no money to be made.

  9. Arthur Etchells

    You mean besides people like us balking at the $$$$ for Atlassian's on-premise stash solution (which product supports this feature) and instead moving our hosted source control away from the Atlassian ecosystem? I can't help but think that's not in Atlassian's interest.

  10. Chesley Brown

    Hmm... Codeship sends out an email whenever a build fails though? Our main concern was whenever we're reviewing pull requests, we wouldn't know if the build for that branch was passing unless we went into Codeship to see.

  11. Chesley Brown

    Exactly... so now with my little app here it automatically places the build status right in the pull request that you create (very similar to how Github shows the build status right in the pull request). So it's right there when you are reviewing.

    I just mean we do get notifications too whenever a build fails.

  12. Johan Bergström

    Chesley Brown I was just thinking of the API in a more generic sense than Codeship.

    Arthur Etchells My view doesn't in any way represent Atlasssian's here, but I can only assume they have enough data to figure out when a user feature would be beneficial to them (for instance, comparing free repos to paying repos); but I do know that a lot of people use Jira and successfully ties it to Bamboo, et al. Their revenue model is pretty different compared to Github's. If people payed the same way for repos they did at Github, it'd probably be a different story. I guess an interesting question would be whether they want to be more aggressive moving into that space.

  13. Chesley Brown

    Jake Bishop all that matters is that I have the id when the pull request is created. Once I have this, the codeship badge can be inserted into the pull request description and then that's all that's needed (which is exactly what the app does). The codeship badge is live, so as the pull request changes (branch updated) it automatically reflects the build status irrelevant of the limitations of the bitbucket pull request API.

    Right now, the only downfall is that it's not retro-active meaning any existing pull requests won't get the codeship badge. Only newly created ones after you enable the hook to the bitbucket-codeship-status app will get it.

  14. Chesley Brown

    Sorry, yeah. Not trying to say Bitbucket shouldn't just properly implement a build status api like github has. That would be ideal. No body likes work-arounds.

    I really feel like this issue should have more upvotes than it does.

  15. Aaron Fay

    I can't speak for Atlassian, but if you use JIRA and Bamboo for your workflow, you get build statuses on the case in JIRA from Bamboo, as well as links to the branch in Bitbucket. It might not be high on Atlassian's list to implement this feature since it duplicates functionality already available in their other products.

  16. Jake Bishop

    Aaron Fay That's a nice feature inside JIRA but this issue is to see the build status for the PR in bitbucket. There are many scenarios where this would be useful, even for those using jira and bamboo.

  17. Luiz Filho

    Man, I've made up the choice of BitBucket over Github for my company, but I'm starting to regret it! Everytime I come here the issues are years old and we never hear back from Atlassian guys. I really think they only care about Jira. :/

    Just look at that pull request hook link too. Incredible. In-credible.

    Come on guys, if I just wanted a place to store git repos in the cloud I would be using Dropbox lol. Give us some functionality for God's sake. We're paying good money on these tools to have them so poorly designed and implemented like this. :(

    Erik van Zijst could Atlassian postion itself in these matters?

  18. Jamon Holmgren

    And it's priced accordingly. Github would be $500/mo+ for how many repos I need.

    With that said, I agree with Luiz that Atlassian should pay at least a little attention to these popular requests.

  19. Johan Bergström

    Almost a year since last staff touched this issue. How silence is the chosen strategy here is beyond me. Is there any way we can amplify this issue as an example of how communication with Atlassian works -- perhaps that would warrant a response? All I'm really looking for here is "Nope" or "check back in 2016".

  20. Quentin Raynaud

    Well this issue is two years old and represent maybe a few days/weeks of work. Is there any information anywhere on the size of the team working on bitbucket? I think the team is probably insanely small. That would explain a lot. Unresponsiveness, very rare new features, etc. A very small team would be overwhelmed by the bb community and keeping up with bugs and infra alone would be a major task.

    But well, bb is not free for teams and I'm willing to pay… If the service is there. Right now it is definitely not. This is sad because bb could be a GREAT tool with only small additions here & there.

  21. Johan Bergström

    Quentin Raynaud By measuring activity on bitbucket over the last two years I'd guess they have 2-3 people full time (if even) assigned to bitbucket. Atlassians design team probably travels between products and their infra probably handles all of them. I reckon its also pretty safe to assume that time is spent where money is made; so that'll be in Jira, Bamboo, Confluence, et. al.

    Edit: One way of looking at it could be by using their issue tracker; here's for instance all closed feature enhancements: https://bitbucket.org/site/master/issues?kind=enhancement&status=closed -- if you just look at closed tickets you'll also find that they're support related.

    What really bugs me is the intentional lack of communication; I mean, what are these guys to tell us when they probably know that the answer is "when people start paying"? They could at least be honest enough and tell us no. Years ago, you could run a business in silence -- but with today's interconnectivity and tools its hard to avoid what's going on in this very issue; the users [us] are using their own tool to take them out of their business by pointing out unanswered flaws. Transparency is key.

    I have respect for what they've been doing in some areas and I really appreciate their suite and pricing plans; so I'm going to stop here - but as a customer not getting your needs met there's only one thing you can really do; go someplace else.

  22. Quentin Raynaud

    Johan Bergström I totally agree with you. But if you are right and there actually is only 2-3 people working on bitbucket full time, then it stands to reason they don't have time to get some things done & to answer tickets…

    What I find dumbfounding is that with a bigger team & funds, I believe people would pay for bitbucket (as they are paying for github). Obviously people don't want to spend money on a tool that looks dead. I think it needs to have a future to get people investing on it.

  23. Paul Draper

    Jamon Holmgren, how could you pay Github $500/mo+?

    They only charge for private repos. An individual can have 50 private repos for $50/mo. And organization (unlimited members) can have 125 private repos for $200/mo.

    You must have several hundred private repos and be far beyond the Platinum team level.

  24. Jamon Holmgren

    Paul Draper, I currently have ~325 repos. In 10 years of being in business building client websites and apps, you tend to accumulate a few projects. :) Granted, maybe 30% of those are random test apps/websites and another chunk are older websites we no longer maintain, but even the $200/mo at Github would feel limiting to us.

  25. Jake Bishop

    Atlassian just do not keep us up to date or comment on these issues. Without feedback we cannot make decisions and will at some point have to move away from their products because we are uncertain that they are being actively supported / developed. Maybe it's time to take this to twitter?

  26. Armin Vieweg

    What is really annoying, that this whole functionality has been already implemented in Stash. And also Bitbucket got a rest API. So I don't see the problem to migrate the feature. This should not be too expensive. I guess that ignoring this issue has more political reasons (to force Atlassian users, to use Stash, eg.). :'(

  27. chrisdecoster

    I don't think paying for this feature is the real problem, its that you have to jump into the entire Stash product to get it. It reminds me of a subscription tv package where if you only want to watch channel but you are forced to buy a package that includes things you wont use.

  28. Ike DeLorenzo

    Better CI integration with major vendors for build status is part of a big push for us currently. And the Bitbucket and Stash engineering team is certainly working toward having parity between the two products in this and other areas.

    We understand how important build status -- in the Bitbucket UI -- is to a large number of developers. While we don't announce features on the issues boards (so this isn't an announcement) you can expect this overdue feature to be in Bitbucket over the coming months. - Ike DeLorenzo, PM, Bitbucket

  29. Vincent Duke

    going to +1 this request Would love to be able to hold off pull request while waiting for a build status without having to go to Travis CI or to Shippable's interface.

  30. Panayiotis Papadopoulos

    Thank you for your email, I will be in training in Plano, TX till Wednesday 18th. You may experience some delays into getting back to your email due to travel schedules.

    I will try to get back to you as soon as possible

  31. Luiz Filho

    So... Yeah... This is our last month on BitBucket. Just finished migrating everything to GitHub and the price, in my company's case, stayed the same. Good bye, Atlassian. Shame.

  32. Vincent Duke

    Honestly, I am pretty anxious for this feature. Atlassian seems to have some high interest in offering it's cloud solution. I LOVE bit bucket for it's extra permission control so I don't need to mess with forking to keep sloppy dev's from pushing bad code into the production branch which is a feature that is missing from GitHub. And Stash is already supporting this and I highly doubt Atlassian would prefer me paying $10/year instead of $10/month. I would gladly upgrade to a paid bitbucket plan for this feature. Can we at least get an ETA on this? I would prefer not to have to spin up a server to run stash.

  33. Johan Bergström

    Edit: Disregard this commend based on thread below.

    Since we haven't heard from staff in a year, I think it's fair for community to suggest feedback instead of this issue staying silent.

    Vincent Duke: I don't think you hold off any business decisions based on waiting for an ETA. Take the bullet and either sign up for stash or move to github/some other repo. Also, I don't think this issue tracker is the right way to speak with Atlasssian. If it was, we'd gotten a reply by now. I suggest we seek replies elsewhere.

  34. Chesley Brown

    Bitbucket has responded (albeit maybe not the exact answer we wanted, but it's closer to good news than bad news).

    Better CI integration with major vendors for build status is part of a big push for us currently. And the Bitbucket and Stash engineering team is certainly working toward having parity between the two products in this and other areas. We understand how important build status -- in the Bitbucket UI -- is to a large number of developers. While we don't announce features on the issues boards (so this isn't an announcement) you can expect this overdue feature to be in Bitbucket over the coming months. - Ike DeLorenzo, PM, Bitbucket

  35. Geoffrey Chan

    bitbucket is a secondclass citizen to stash.

    my organization moved to stash and if you're an open source project... I'd recommend moving to github and use travis-ci.

  36. Armin Vieweg

    It seems as if Bitbucket is standing still. There are no new features; even the unofficial announcement of Ike DeLorenzo is three month old without any results, yet. This is very disappointing. I love Bitbucket very much, but I don't want to use a service which reminds me so strongly of Google Code (which is deprecated now)... So please, don't fail like Google did, with Google Code, and get things in gear! Thanks.

  37. Dan Bennett staff

    Hello everyone,

    A commit status API is currently in active development. I can't yet say when it will be ready for public consumption, however, there is currently no risk of it being halted and re-backlogged.



  38. Gion (Bogdan)

    Hi guys, I use to work on github for a couple of years, but a few months ago I changed my job and I had to work with bitbucket. The thing I miss the most in bitbucket is the built in CI services integration.

    After searching and not finding any Bitbucket integration that worked in a simmilar way github and travis do, I decided to build my own solution that gives me the desired result. This way I built BitShip - a chrome extension that connects Bitbucket and Codeship. It only needs a codeship api key, and after that it hooks into your bitbucket pull request page, inserts the codeship status badge for that pull request: bitship-disable.png and... it gets better: it disables the merge/approve buttons if the build is failing:


    I use it effectively on each project and gets the job done.

    Chesley Adler Brown: I did try your approach but some how wasn't able to make it work. Your bitbucket-codeship-status app inspired me to build my own.

    My solution might not be perfect, but it can be a lifesaver for codeship and bitbucket users.

    @ Staff: I don't mean to be rude, but since this is an old thread and people are starting to make hacks just to get this functionality into bitbucket, why isn't anything moving forward on this topic?

  39. Dan Bennett staff

    Followup to my 7/17 update:

    Work is still underway and, while I can't yet give a precise date, I expect the build status functionality as you see in Stash to land in Bitbucket in less than 8 weeks.



  40. Dan Tao staff

    @iw-vieweg Yes, it will land in less than 4 weeks. We've already implemented it and are testing it internally at the moment. Expect to see an initial version (we will continue to make some improvements even after releasing) in the next 1–2 weeks.

  41. Daniel Anechitoaie

    Dan Tao Can you post a print screen of how it looks like? Just curious, and totally understand if the screen shoot will not reflect the final version, or whatever, just curious to have a sneak peek and see how it looks like.

    I have developed a custom automated reviewer for the PR and right now it just leaves a comment as a normal person, removing the old ones. Would be nice to have a dedicated section like GitHub has.

  42. chrisdecoster

    Thanks this feature is huge for bitbucket!

    Armin Vieweg Will the setup require extra configuration/services from third party ci services? For example I want to use appveyor, will it be just a matter of configuration or will I have to wait for appveyor to integrate things on their side?

  43. Armin Vieweg

    Robert Main Yesterday I've found a ticket of Travis for Bitbucket support. They've closed the ticket in 2012 with the reason:

    Well, the full explanation is that we do have this on our radar but the changes would be very very extensive. We don't have a timeline for this, nor even confirmation it will go ahead. Thanks for logging the issue, but it is best to close it for now. Sorry.

  44. Dan Tao staff

    Zach Davis kindly reminded me yesterday:

    one week until you're a liar

    What a nice guy!

    In all seriousness, I acknowledge that we have fallen a bit behind on this one. We've already enabled the feature behind the scenes for a handful of CI vendors to help us test it out, and we'll be exposing the option for all users to enable build status for their repos within a week. So, I'm almost not a liar! In the meantime I will address a few comments that were posted since my last update:

    • Daniel Anechitoaie: @iw-vieweg is right that the UI will look remarkably similar to what Bitbucket Server (formerly Stash) has.
    • chrisdecoster: Since this feature is API-driven @iw-vieweg is right that it requires integration on the side of CI tool. As I mentioned we are actively working with various vendors to integrate, and I fully expect that more integrations will be built after we launch as well.
    • Richard Simko [RefinedWiki]: Unfortunately I'm not sure if Bamboo integration will be ready by the time we launch.

    On the subject of integrations, if anybody here works on a CI tool or code analysis tool or anything along those lines and would like to get early access to this feature to build your own integration, let me know. Everyone else: expect a happy update or profuse apology from me within a week.

  45. Dan Tao staff


    Bit of a disappointing update, I'm afraid. We won't be releasing this feature quite as soon as promised (i.e., not today). As you've probably noticed, Bitbucket has been experiencing stability issues recently and it's gotten to the point where we clearly need to address these as an entire team. With that in mind our focus over the coming weeks is going to be throwing everything we've got at improving site performance and reliability, putting feature work temporarily on hold.

    It isn't that the feature isn't ready—as I mentioned earlier, we've already enabled it for select CI vendors to help us test and build integrations—but we need to really focus on hardening our application and our infrastructure so that the incidents and outages we've been experiencing become a thing of the past.

    I know this isn't what you guys wanted to hear, but I really appreciate your understanding. I'll make an effort to keep this issue updated on at least a weekly basis so that you know where things stand (and so @iw-vieweg doesn't have to keep refreshing the page). Here's hoping I'll have a much happier update in the near future.


  46. Rafael Oliveira

    Dan, it would be nice if you could keep updating us on a weekly basis.

    I totally agree that you guys need to improve the stability. Release the feature now won't make a difference since my CodeShip tests aren't being triggered by bitbucket webhooks...

  47. Dan Tao staff

    Well, I missed the mark on providing an update last week, so here's what's been going on in the past week and a half (or so):

    • The team has made some significant headway on performance and stability, though we obviously won't be doing any celebrating until we've been rock-solid for an extended period of time.
    • austinsharp, I'm happy to let you know that integration with Bamboo is indeed in the works. I can't provide an exact release date but you can safely assume that integration with Bamboo will be available in the not-distant future.

    That's about all the news I have since, as I stated in my previous update, the team is currently focused on our site's stability rather than features. Nonetheless, I will try to remember to provide another update next week, even if it's "still working on performance stuff" :)

  48. Armin Vieweg

    Dan Tao Sorry for this post, but I am very disappointed!! Not even one single "promise" of you has been fulfilled:

    2015-09-22 - "Yes, it will land in less than 4 weeks."

    2015-10-16 - "Everyone else: expect a happy update or profuse apology from me within a week."

    2015-10-22 - "Bit of a disappointing update, I'm afraid. We won't be releasing this feature quite as soon as promised [...] I'll make an effort to keep this issue updated on at least a weekly basis so that you know where things stand"

    2015-11-03 - "Nonetheless, I will try to remember to provide another update next week, even if it's 'still working on performance stuff'"

    Today, 13 days later, nothing.

    This is not how you should communicate with customers. And yes, we pay for Bitbucket this makes us by definition to a customer. If this would be open source, I wouldn't complain, but in this case I can just repeat my frustration. If this becomes not better, I'm feeling forced to look for an alternative solution, where I don't feel to be left high and dry...

  49. Tibor Barna

    While all of the above is true, this is still one of the most pro-active engagements on public issues that I have seen from Atlassian. There is definitely room for improvement but we should acknowledge the positive steps taken as well.

  50. Dan Tao staff

    All right, I get it, @iw-vieweg! Geez. Tough crowd.

    You're right to point out that I haven't been as communicative as promised. That's on me and is basically a time management issue—just a mere human being over here! I'll try to do better in the future.

    Worth reiterating, though, is the fact that this feature was delayed while the Bitbucket team focused on addressing some more fundamental performance and scalability issues. Our number 1 priority has always been and always will be providing a reliable platform for development teams like all of you. Last month we saw the need to invest significant resources in renewing our commitment there, which is why this along with other feature work (like projects) got put on hold.

    But let's get to the good news. We're planning to launch this feature this week. And believe me, I'm looking forward to shipping this functionality every bit as much as you're looking forward to using it!

  51. Steve Peak

    Thank you for the release!

    Dan Tao I'm integrating this into Codecov (https://codecov.io) right now. However, I notice that you cannot get a list of all CI statuses. I suggest adding an endpoint to get all the statues on a commit, its essential to some of the core functionality of Codecov to determine when CI has completed.


  52. Nathan Goldbaum

    Dan Tao is there a way to apply build statuses to commits in forks? Right now it looks like the only way to apply a build status to a pull request is to use the API endpoint you've added for the build status of the latest commit in the pull request. That's fine if the test bot has write access to the fork that is issuing the pull request, but doesn't work otherwise. Would it be possible to eventually add a build status API endpoint for the pull request itself rather (which is associated with the "main" repository that the build bot can have access to) than an individual commit?

  53. Antonio Mansilla

    I'm experiencing issues with the build status UI, the user case is the following:

    1. You have a repository and a fork of this one.You create a pull request from the fork to the canonical repo.
    2. You publish the build status as SUCCESSFULL on the pull requested commit on the forked repo.

    The problem in fact is that the forked repo properly shows the build status but it's not gonna be shown in the pull request page of the canonical repository (https://bitbucket.org/username/reponame/pull-requests/).

    Can anyone tell me if this is still not supported, not desired or I misunderstood something? cc Dan Tao

  54. Dann Stockton

    Dan Tao: any word on getting all statuses from this endpoint now? (like Steve Peak suggested) I'd love to see that too. It'd be super useful so you don't have know about the builds ahead of time to get their status.

    I'd imagine it'd look like this:

    GET https://api.bitbucket.org/2.0/repositories/{owner}/{repo_slug}/commit/{revision}/statuses/build/

  55. Dan Tao staff

    Dann Stockton Yes, we actually do have that API! As for the URL, your guess was close; it's at:

    GET https://api.bitbucket.org/2.0/repositories/{owner}/{repo_slug}/commit/{revision}/statuses

    To see an example, try hitting https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/d62ae57/statuses.

    We are in the process of making some changes to our documentation, so this small but useful addition slipped through the cracks. I'll be sure to get our docs updated soon, but in the meantime the API is there for you to use.

    cc Steve Peak

  56. Dan Tao staff

    Steve Peak you asked that question months ago and I totally forgot to respond! My understanding is that at this point you've already gotten the information you were looking for; but for posterity, in case anyone else was wondering, we do have a diff API. The documentation (not perfect, but better than nothing) is here: https://confluence.atlassian.com/display/BITBUCKET/diff+Resource

    Basically you can hit /diff/bar..foo and get a raw diff of the changes from foo to bar.

    Example: https://api.bitbucket.org/2.0/repositories/tortoisehg/thg/diff/c594574..0fef1c0

  57. Log in to comment