- Create a new job.
- Add the project's GitHub URL to the "GitHub project" field (the one you can enter into browser. eg: "https://github.com/janinko/ghprb")
- Select Git SCM.
- Add your GitHub "Repository URL".
Under Advanced, set "refspec" to
In "Branch Specifier", enter
or if you want to use the actual commit in the pull request, use
- Under "Build Triggers", check "Github pull requests builder".
- Add admins for this specific job.
- If you want to use GitHub hooks for automatic testing, read the help for "Use github hooks for build triggering" in job configuration. Then you can check the checkbox.
- In Advanced, you can modify:
- The crontab line for this specific job. This schedules polling to GitHub for new changes in Pull Requests.
- The whitelisted users for this specific job.
- The organisation names whose members are considered whitelisted for this specific job.
- Save to preserve your changes.
Make sure you DON'T have "Prune remote branches before build" advanced option selected, since it will prune the branch created to test this build. As noted in issue #507 this may be achieved by unchecking 'Lightweight checkout'.
If you want to manually build the job, in the job setting check "This build is parameterized" and add string parameter named "sha1". When starting build give the "sha1" parameter commit id you want to build or refname (eg: "origin/pr/9/head").