Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
When the commit build status is updated through the API, the pull request merge check functionality, which checks the last commit for at least 1 successful build, no failed builds, and no in-progress builds, doesn't work as expected.
For example, if the last three commit statuses were successful, failed, and failed, the check should ideally pass since the latest one is successful. However, the current implementation checks for any failed build in the list, causing the merge check to fail.
This behavior differs from Bitbucket Pipeline builds, where only the latest build status is considered to pass or fail the merge check. This needs to be implemented for commit build status updated via the API as well.
Workaround: Use "PR ID" for the API key parameter so that the build status will be overwritten. This way, if the latest build is successful, the merge check will pass.