feat(bitbucketserver): get changes from all commits in a single push event#5748
Merged
qwerty287 merged 5 commits intoNov 18, 2025
Merged
Conversation
qwerty287
reviewed
Nov 13, 2025
qwerty287
left a comment
Contributor
There was a problem hiding this comment.
Thanks, looks good already. Just some style improvements. And then let's wait for the lib to merge the PR.
Contributor
Author
new release is out from go-bitbucket library, and this PR is updated to use it |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5748 +/- ##
=======================================
Coverage 21.46% 21.47%
=======================================
Files 428 428
Lines 38603 38622 +19
=======================================
+ Hits 8288 8293 +5
- Misses 29550 29561 +11
- Partials 765 768 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
qwerty287
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, on a push event, only the changed files from the last commit are used e.g. to check path conditions:
In general the push event can contain multiple commits, which currently leads to missed pipeline executions. An example with the snippet above would a user commiting changes to their *.md files, after which making other commits targeting other files. Pushing commits would not trigger the pipeline above if the last commit would not have any changes to .md files.
The proposed change uses the range of commits (From&To) in the webhook payload with Bitbucket data center compare commits API to list the changed files across a set of commits.
In case the branch is created/deleted, bitbucket reports commit as 0000000000000000000000000000000000000000". The current implementation then checks changes against the default branch. This has its own problems and might cause too wide executions, but the bitbucket webhook implementation also truncates the list of commits to include in the payload to max 5 commits, so there are no information in the payload that could be used as an anchor point as "the earliest" commit/reference in case of new branch.
This change requires changes to neticdk/go-bitbucket (pr open neticdk/go-bitbucket#37)