bitbucket-push-and-pull-request-plugin
bitbucket-push-and-pull-request-plugin copied to clipboard
Plugin checking for incorrect repository for forked repos
When attempting to set up a PR build pipeline for a repository that is a fork, it appears from the logs that the plugin is trying to match the repository information with the wrong piece information in the JSON that gets send over the webhook.
Jenkins logs show this after committing one of the trigger actions that spins up a PPR observer:
Trying to match https://bitbucket:8445/scm/proj/repo.git<-->https://bitbucket:8445/scm/other_proj/forked_repo.git
When looking through the webhook payload, the clone information for the origin as well as the project are both present. origin points to the main usptream repo, project points to the forked repo (the one we want to build). These items are located in pullRequest/fromRef/Repository within the JSON passed over via the webhook. It would appear based on the logs that the plugin is preferring to use the information in origin before the information in project, even though project is the only information present in the webhook payload from a non-forked repo.
Running the latest version of the plugin and Bitbucket server version 7.17.9.
In case it is not clear, the plugin looks to be grabbing the information from origin, which is the upstream repository, not the forked repository that we ultimately want to be built.