REST /rest/build-status calls not being routed to RepositoryBuildStatusSetEvent

Hello

In Bitbucket 8 the ‘com.atlassian.bitbucket.build.BuildStatusSetEvent’ got removed. There is the newer ‘com.atlassian.bitbucket.build.status.RepositoryBuildStatusSetEvent’ replacement.

However, I’ve noticed that REST calls to the POST /rest/build-status/1.0/commits/{sha} does not trigger the newer RepositoryBuildStatusSetEvent event.

In Bitbucket 7, if the /rest/build-status/1.0/commits/ endpoint is called, the old, deprecated BuildStatusSetEvent is triggered. However, in Bitbucket 8 the event is gone and you have no way to get build notifications via the ‘/rest/build-status/1.0/commits/’.

There is another REST api to update build events, the /rest/api/1.0/projects/{PROJ-KEY}/repos/{repo}/commits/{sha}/builds, which is routed to the RepositoryBuildStatusSetEvent event. However, if a tool uses the build-status, then you are out of luck.

Is there a way to get events for both REST APIs, which works for Bitbucket 7 and 8?

Update: Ahah, the /rest/build-status/1.0/commits/ REST API is deprecated. It was marked as such in version 8.3. However, then it looks like the documentation got moved or disappeared.

Cheers
Roman

1 Like

Hi Roman,
we came across the same issue - and built a servlet filter for /rest/build-status/.. to generate the event for the app. Hope that helps.
Cheers, the Izymes team :slight_smile:

2 Likes

Thanks for the work around idea =)

1 Like