mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

'Trigger build' in a Pull Request sends the orginating branch and no the PR-branch from Stash #84

Closed WhiteHatTux closed 9 years ago

WhiteHatTux commented 9 years ago

We have recently upgraded to Stash 3.2.4, which resulted in some odd behaviour with pull-requests. I suspect the problem is a result of the rather radical changes to Pull Request handling.

The problem: A new build of my Pull Request job is not triggered with a change in a Pull Request and is also not triggered, when pushing the 'Trigger build' button.

Steps to reproduce:

  1. Create a Pull Request
  2. Push the 'Trigger Build' button inside the PR
  3. Observer the request to jenkins that is created.

Expected result: The supplied url to jenkins should contain

  1. the url to the repository
  2. the stash-branch to represent the PR (refs/pull-requests/${PR-number}/from)
  3. optionally the sha1 to represent the PR Such a URL would cause my Pull Request job to run on the supplied change

Actual result: The supplied url contains:

  1. the url to the repository
  2. the stash-branch this PR originates from
  3. the sha1 of the last commit in the branch the PR originates from This does not do anything, as i have no job building the originating branch

If i manually build the PR job in jenkins it will run just fine and publish the result to the pull request.

WhiteHatTux commented 9 years ago

Duplicate of https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/83

mikesir87 commented 9 years ago

Duplicate of #81. Merging in to that request.