bitbucket-branch-source-plugin
bitbucket-branch-source-plugin copied to clipboard
534 | Multiple triggers of the same PR
Fixes #534 , our problem with multiple triggers of the same PR was related to new PR events while some "main"-branch push hook is in progress. "main" hook (namely getIncomingOpenPullRequests due to requests to changes api) can take up to 10-14 minutes when we have about 200 PRs and even if we have some new changes in PRs during that time, main hook still finishes with older revision and changes it back thus generating 2 additional builds (change to old revision and change back to current revision). Proposal here is to request PR list again after changes api calls have completed so that we have up to date information when "main" hook finishes
Your checklist for this pull request
- [x ] Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
- [x ] Ensure that the pull request title represents the desired changelog entry
- [ x] Please describe what you did
- [ x] Link to relevant issues in GitHub or in Jenkins JIRA
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Did you provide a test-case? That demonstrates feature works or fixes the issue.
@lifeofguenter could you please look, maybe you will have better ideas. Basically this is to address the following situation, when we get bitbucket api info, run calls for changes api for each PR and then returns revisions which are already 10 minutes in the past: