Answers: <p>It sounds like maybe you need to configure a <a href="https://developer.github.com/webhooks/" rel="nofollow noreferrer">webhook</a> for git if you are using the <a href="https://wiki.jenkins.io/display/JENKINS/Git+Plugin" rel="nofollow noreferrer">git plugin</a>, but I think that may just build the master branch. I haven't used git much, so you might be able to use the web hook to have it build the pull request - I don't know.</p>
  
  <p>Instead, you might want to check out the <a href="https://wiki.jenkins.io/display/JENKINS/GitHub+pull+request+builder+plugin" rel="nofollow noreferrer">pull request builder plugin</a> and see if that does what you are looking for.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-11-16T17:01:07.697Z
Answers: 2017-11-16T17:01:07.697Z
Answers: James Shewey
Answers: <p>According to the <a href="https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#github-branch-source" rel="nofollow noreferrer">official documentation for the GitHub Branch Source plugin</a>:</p>
  
  <blockquote>
    <p>While the build triggers are often enough, you can set up webhooks to
    automatically trigger builds when changes are pushed to your GitHub
    repositories. To do this you must have a GitHub login with a token.</p>
    
    <ol>
    <li><p>Go to the main configuration settings page, Manage Jenkins > Configure System</p></li>
    <li><p>In the GitHub Plugin Configuration section, add a server with your credentials</p></li>
    <li><p>If you need a token, generate one with the Additional Actions > Convert login to password and token</p></li>
    </ol>
    
    <p>You can also configure this manually through GitHub itself by
    registering the URL provided in the help section of the server config.</p>
  </blockquote>
  
Answers: CC BY-SA 3.0
Answers: 2017-11-17T18:09:02.707Z
Answers: You can trigger *on push* but can you trigger *on a pull request submission*
Answers: James Shewey
Answers: CC BY-SA 3.0
Answers: 2017-11-17T21:31:43.780Z
Answers: Not sure. I haven't used the GitHub Branch Source plugin myself.  I have used its sister plugin, the Bitbucket Branch Source plugin, which requires a second plugin on the Bitbucket end to trigger builds from PRs.
Answers: jayhendren
Answers: CC BY-SA 3.0
Answers: 2017-11-17T17:27:05.720Z
Answers: 2017-11-17T17:27:05.720Z
Answers: jayhendren
Body: <p>We are using Github for source control and Jenkins for our builds.</p>
  
  <p>In Jenkins, we are using GitHub Organization Folder plugin along with Multibranch pipeline plugin. This causes the repository to show up in Jenkins, and each repository has a Jenkinsfile in it. And each PR(in github) has a status check, which checks if the build of the PR is good or not. </p>
  
  <p>Everything works fine, except for the fact that once a PR is opened or updated, the PR is not built in Jenkins automatically. You have to manually go to Jenkins and trigger the PR build. </p>
  
  <p>As far as master branch is concerned, it works like a charm. If the master branch is updated, Jenkins automatically triggers the build. </p>
  
  <p>I have attached the screen shot of the branch configuration in Jenkins for the GitHub Organization. 
  So my question is what should be done for PR opening or updating, that would cause Jenkins to start build automatically. </p>
  
  <p><a href="https://i.sstatic.net/TuPN4.png" rel="noreferrer"><img src="https://i.sstatic.net/TuPN4.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/HnNWQ.png" rel="noreferrer"><img src="https://i.sstatic.net/HnNWQ.png" alt="enter image description here"></a></p>
  
Tags: <jenkins><jenkins-pipeline>
Title: PRs not automatically getting trigger in Jenkins github organization
UserDisplayName: Prashant
ThreadText: # PRs not automatically getting trigger in Jenkins github organization
  
  (Asked by: username_0 on 2017-11-15)
  
  We are using Github for source control and Jenkins for our builds.
  
  In Jenkins, we are using GitHub Organization Folder plugin along with Multibranch pipeline plugin. This causes the repository to show up in Jenkins, and each repository has a Jenkinsfile in it. And each PR(in github) has a status check, which checks if the build of the PR is good or not.
  
  Everything works fine, except for the fact that once a PR is opened or updated, the PR is not built in Jenkins automatically. You have to manually go to Jenkins and trigger the PR build.
  
  As far as master branch is concerned, it works like a charm. If the master branch is updated, Jenkins automatically triggers the build.
  
  I have attached the screen shot of the branch configuration in Jenkins for the GitHub Organization.
  So my question is what should be done for PR opening or updating, that would cause Jenkins to start build automatically.
  
  [![enter image description here](https://i.sstatic.net/TuPN4.png)](https://i.sstatic.net/TuPN4.png)
  
  [![enter image description here](https://i.sstatic.net/HnNWQ.png)](https://i.sstatic.net/HnNWQ.png)
  
  **Tags:** jenkins, jenkins-pipeline
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-11-16. Score: 3
  
  It sounds like maybe you need to configure a [webhook](https://developer.github.com/webhooks/) for git if you are using the [git plugin](https://wiki.jenkins.io/display/JENKINS/Git+Plugin), but I think that may just build the master branch. I haven't used git much, so you might be able to use the web hook to have it build the pull request - I don't know.
  
  Instead, you might want to check out the [pull request builder plugin](https://wiki.jenkins.io/display/JENKINS/GitHub+pull+request+builder+plugin) and see if that does what you are looking for.
  
  
  ---
  
  ### Answer by username_2 on 2017-11-17. Score: 1
  
  According to the [official documentation for the GitHub Branch Source plugin](https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#github-branch-source):
  
  > While the build triggers are often enough, you can set up webhooks to
  > automatically trigger builds when changes are pushed to your GitHub
  > repositories. To do this you must have a GitHub login with a token.
  >
  > 1. Go to the main configuration settings page, Manage Jenkins > Configure System
  > 2. In the GitHub Plugin Configuration section, add a server with your credentials
  > 3. If you need a token, generate one with the Additional Actions > Convert login to password and token
  >
  > You can also configure this manually through GitHub itself by
  > registering the URL provided in the help section of the server config.
  
  > **Comments:**
  > **username_1**: You can trigger *on push* but can you trigger *on a pull request submission*  
  > **username_2**: Not sure. I haven't used the GitHub Branch Source plugin myself.  I have used its sister plugin, the Bitbucket Branch Source plugin, which requires a second plugin on the Bitbucket end to trigger builds from PRs.  
  
  ---
  
  