Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata
Multibranch projects and organization folders from GitHub.

Plugin Information

View GitHub Branch Source on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:


Currently hosted here.


Version 2.5.8 (September 27, 2019)

JENKINS-58942 - Getting issue details... STATUS  - Configurable webhook URL 

JENKINS-57557 - Getting issue details... STATUS  - Add test for JCasC compatibility

JENKINS-59321 - Getting issue details... STATUS  - Fix the exception handling when url is invalid

PR#248 - Use HTTPS URLs in pom.xml

Version 2.5.7 (September 10, 2019)

JENKINS-58862 - Getting issue details... STATUS  - Fix NPE when web hook triggers build on tag delete

Version 2.5.6 (August 15, 2019)

JENKINS-58862 - Getting issue details... STATUS  - Fixed an issue where new projects using GitHub Enterprise servers were being incorrectly configured to use github.com

Version 2.5.5 (July 26, 2019)

JENKINS-50999 - Getting issue details... STATUS  - Added option to enter repository URL manual instead of from drop-downs to avoid query timeouts for large organizations

Version 2.5.4 (May 23, 2019)

JENKINS-43802 - Getting issue details... STATUS  - Support Shared Library using folder-scoped credentials 

JENKINS-42443 - Getting issue details... STATUS  - f:select should show a spinner while AJAX requests are in-flight (dependency on Jenkins Core v2.167)

Version 2.5.3 (May 23, 2019)

JENKINS-57583 - Getting issue details... STATUS  - Fixed compatibility with the "Ignore target brach" setting

JENKINS-57371 - Getting issue details... STATUS  - Added graceful fallback to cloning for PRs when needed 

Version 2.5.2 (May 8, 2019)

JENKINS-56996 - Getting issue details... STATUS  - Errors when scan PRs no longer halts org/repo scan.  PR will be ignored or marked orphaned and scan will continue. 

Version 2.5.1 (May 1, 2019)

JENKINS-57257 - Getting issue details... STATUS  - Fixed regression in 2.5.0 that caused for PRs from forks to fail

Version 2.5.0 (April 26, 2019)


Today, any PR that requires merging ends up cloning the associated GitHub repository on a Jenkins master, regardless of whether the Jenkinsfile was changed or not. In this release, we have significantly reduced the number of occurrences in which unnecessary full clones on the master happen.

For details see:  JENKINS-43194 - Getting issue details... STATUS  - Lightweight checkout for PR merge jobs.

Version 2.4.5 (March 27, 2019)

Version 2.4.2 (Jan 16, 2019)

Version 2.4.1 (Oct 15, 2018)

  • JENKINS-54046 - Getting issue details... STATUS  Disabled the cache by default for Windows masters.

Version 2.4.0 (Oct 4, 2018) - Version 2.4.0-beta-1 (Oct 2, 2018)

  • Added localization for Chinese
  • JENKINS-50323 - Getting issue details... STATUS
  • Basic GitHub API optimizations using a cache (-Dorg.jenkinsci.plugins.github_branch_source.GitHubSCMSource.cacheSize=0 to disable)

Version 2.3.6 (June 5, 2018)

Version 2.3.5 (June 4, 2018)

Version 2.3.4 (April 20, 2018)

Version 2.3.3 (March 14, 2018)

  • JENKINS-49945 - Getting issue details... STATUS
  • Switched default forked PR trust strategy from Contributors to the more secure From users with Admin or Write permission, adding warnings in the UI about insecure strategies.
  • Reduction in log noise.

Version 2.3.2 (December 18, 2017)

  • JENKINS-36574 - Getting issue details... STATUS  Allow extension plugins to control the notification context (contributed by Steven Foster)
  • JENKINS-47585 - Getting issue details... STATUS  Add support for lightweight changelog
  • JENKINS-48035 - Getting issue details... STATUS  GitHub Webhook is not created right after saving the job
  • Do not throw away stack trace for some chained exception failure modes (PR#159)
  • Update baseline GitHub API dependency to version that fixes the ID > Integer.MAX_VALUE overflow (08b3d32)

Version 2.3.1 (November 9, 2017)

  • JENKINS-47902 - Getting issue details... STATUS  The addition of tag support in 2.3.0 also included changes that removed the need for a clone of the repository to master with some code paths using pipeline shared libraries. The fix code did not include the fix for JENKINS-47824. This is regression is now fixed on top of tag support.

Version 2.3.0 (November 7, 2017)

  • JENKINS-34395 - Getting issue details... STATUS  Add support for discovery of tags.

    This feature adds a new "Discover Tags" behaviour which, when added will discover tags. With this feature there are now three types of things that can be discovered: branches, pull requests and tags.

    When used with the Branch API Plugin, tags will show up as a new category. The default configuration of Branch API will not trigger builds for tags automatically.

    This is by design, as one of the use-cases for tag discovery is to use the tag job to perform deployment. If tags were built automatically, given that the order in which the tag jobs actually execute is undefined, the automatic build could cause significant issues. Branch API does provide a mechanism to control what gets built automatically (known as the BranchBuildStrategy) but that cannot be configured until you have at least one extension plugin that provides a BranchBuildStrategy.

    If you want tags to build automatically, you will need an extension plugin for Branch API that implements at least one BranchBuildStrategy, see AngryBytes/jenkins-build-everything-strategy-plugin for a prototype example of such an extension plugin. 

Version 2.2.6 (November 4, 2017)

  • JENKINS-47824 - Getting issue details... STATUS  When using GitHub as a Modern SCM for shared pipeline libraries, tag revisions did not work.

Version 2.2.5 (November 1, 2017)

  • JENKINS-47775 - Getting issue details... STATUS  Fix optimized event processing of PRs that have been closed.

Version 2.2.4 (October 20, 2017)

  • JENKINS-46967 - Getting issue details... STATUS  Upgrade parent POM and upgrade the baseline for github-branch-source
  • PR#161 github.getRepository expects 'org/repo' format
  • PR#151 Upgrade Credentials plugin to 2.1.15 
  • JENKINS-46449 - Getting issue details... STATUS  NPE on build PR head revision
  • JENKINS-46203 - Getting issue details... STATUS  Add a LICENSE file to github repo
  • JENKINS-46295 - Getting issue details... STATUS  Event handling could blow up where a query optimization is attempted for a deleted branch
  • JENKINS-46364 - Getting issue details... STATUS  GitHub Branch Source Plugin can't create status if credential restricted by spec

Version 2.2.3 (July 28, 2017)

  • JENKINS-45771 - Getting issue details... STATUS  Disable shallow clone when we know a merge will take place.

Version 2.2.2 (July 20, 2017)

  • JENKINS-36240 - Getting issue details... STATUS  Added a trust strategy for forks that uses the GitHub permissions API to check for Admin / Write permission

Version 2.2.1 (July 18, 2017)

  • JENKINS-45343 Titles within inline help for Behaviors should match the titles in the dropdown

Version 2.2.0 (July 17, 2017)

  • JENKINS-45574 GitHub Branch Source lists all repositories of myself rather than just those I am an owner of
  • JENKINS-45551 Origin branches disappear when there is a fork with the same branch name
  • JENKINS-45467 On upgrade to 2.2.x, if the username password used as checkout credentials then configuration is migrated to an empty SSH Checkout behaviour
  • JENKINS-45436 API to generate (mostly) human readable names of SCM server URLs
  • JENKINS-45434 Add an avatar cache so that SCMs that providing fixed size avatars can convert to Jenkins native sizes
  • JENKINS-45344 Duplicate entries in Trust dropdown
  • JENKINS-43507 Allow SCMSource and SCMNavigator subtypes to share common traits
  • JENKINS-41246 Branch scanning fails when PR refer to a deleted fork
  • JENKINS-45242 Cannot see private GitHub repos after providing valid API token (alpha-4)
  • JENKINS-45142 Appears a timeout isn't being handled properly: "Server returned HTTP response code: -1, message: 'null' for URL"
  • JENKINS-43755 GitHub username (repo owner) check is too restrictive

Version 2.0.8 (July 10, 2017)

Version 2.0.7 (July 6, 2017)

  • JENKINS-45323 BlueOcean needs methods to manipulate the list of GitHub servers

Version 2.0.6 (May 31, 2017)

Version 2.0.5 (Apr 5, 2017)

  • Not building origin merge PRs when webhook is received (pull #131)
  • JENKINS-41616 Non-trusted pull requests should use a probe against the trusted revision not the PR's revision

Version 2.0.4 (Mar 8, 2017)

  • JENKINS-42057 Report build errors as GitHub status Error
  • JENKINS-42213 Bring baseline Jenkins version up to align with minimum baseline version of required dependencies
  • JENKINS-41904 NPE when selecting a scan credential for GitHub SCM on Pipeline Libraries 
  • JENKINS-36121 Throttle GitHub API usage to ensure that rate limits are not tripped (may still trip if API credentials are shared with another consumer) 
  • JENKINS-42254 Make the Github sync delay configurable
  • JENKINS-32007 / JENKINS-34242 Use a custom select control in order to display indication of AJAX requests in-flight and errors populating drop-downs

Version 2.0.4-beta-1 (Mar 2, 2017)

  • JENKINS-42057 Report build errors as GitHub status Error
  • JENKINS-42213 Bring baseline Jenkins version up to align with minimum baseline version of required dependencies
  • JENKINS-41904 NPE when selecting a scan credential for GitHub SCM on Pipeline Libraries 
  • JENKINS-36121 Throttle GitHub API usage to ensure that rate limits are not tripped (may still trip if API credentials are shared with another consumer) 

Version 2.0.3 (Feb 14, 2017)

  • JENKINS-42000 Pick up API contract changes. (warning)  Upgrading Branch API plugin to version 2.0.6 is required to resolve JENKINS-42000.

Version 2.0.2 (Feb 10, 2017)

  • JENKINS-41820 Some comparisons of organization names were case sensitive by mistake
  • JENKINS-41815 Expose event origin information to aid tracing why builds are being triggered

Version 2.0.1 (Feb 2, 2017)

Version 2.0.0 (Jan 16, 2017)

  • (warning)   Please read this Blog Post before upgrading
  • JENKINS-33273 Optimize Jenkinsfile loading and branch detection
  • JENKINS-40875 Obtuse error given for when credential is invalid
  • JENKINS-40876 ObjectMetadataAction objectUrl never gets populated for PRs or Branches
  • JENKINS-39837 scm: Browser isn't set to GithubWeb
  • JENKINS-39114 Comparing repo owner in webhook with SCM source should be case-insensitiveComparing repo owner in webhook with SCM source should be case-insensitive
  • JENKINS-40833 Report primary branch
  • JENKINS-40826 Do not do long running tasks in a QueueListener
  • JENKINS-40451 Credentials are not being scoped to API endpoints
  • JENKINS-39355 Use SCM API 2.0.x APIs
  • JENKINS-39496 Make PullRequestSCMRevision public
  • JENKINS-39067 Move the GitHub icons to the github-branch-source plugin
  • JENKINS-39062 Move the GitHubRepositoryDescription column to github branch source
  • JENKINS-39026 Add a ViewJobFilter specialized for filtering by Branch
  • JENKINS-38987 SCMHead/SCMSource/SCMNavigator need getPronoun() to assist contextual naming

Version 2.0.0-beta-1 (Dec 16, 2016)

  • Available from the experimental update center only
  • Update to be compatible with the SCM API 2.0 changes. These changes enable:
    • Smart event based hook triggers (no longer does a change request force a full index)
    • Fixes some edge cases with different code paths resulting in the wrong revisions of PRs being built - mainly focused on manually triggered builds from PRs that have had their target branch changed since the branch was first indexed.
    • Pulled in the sensible functionality that was part of GitHub Org Folders... which turns GitHub Org Folders into a tombstone... recommendation is to upgrade GitHub Org Folders to 1.6-beta-1 to migrate the data and then uninstall that plugin after a full reindex
  • (warning)  When upgrading, you may need to force a full re-index of all organization folders and multi-branch projects in order to ensure that the hooks and attached actions are correctly detected.

Version 1.10.1 (Nov 28, 2016)

Version 1.10 (Sep 21, 2016)

  • Changelog generation was incorrectly skipped for noninitial builds of pull request projects.
  • Allowing Blue Ocean to supply alternate URLs for linking back to Jenkins.
  • JENKINS-37253 If only checking the option to build origin branches that have pull requests, nothing was built at all.
  • Use the maximum page size in the REST API to minimize HTTP requests.
  • Demo improvements.

Version 1.9 (Aug 18, 2016)

  • JENKINS-36574 As of 1.8, too many commit status contexts were being sent for certain use cases. Now uses at most three.

Version 1.8.1 (Jul 05, 2016)

  • No changes except for using the new wiki link.

Version 1.8 (Jul 05, 2016)

  • JENKINS-33161 Allow finer-grained control of what kinds of builds are run, including support for pull requests filed from the origin repository, and pull requests built without merging against the base branch. Also fixes robustness bugs such as JENKINS-33237 and JENKINS-34728.
  • JENKINS-33623 Proxy configuration not correctly handling wildcards.
  • Added more logging about webhooks in pull requests.

Version 1.7 (May 13, 2016)

  • JENKINS-34727 WebHook events are not always successfully triggering Jenkins pipeline
  • JENKINS-34776 Jobs are removed if the remote is unavailable
  • Added extra log messages from WebHook processing

Version 1.6 (Apr 27, 2016)

  • JENKINS-34410 Improve the search procedure of SCRIPT_FILE, when you work with Pipeline Multibranch projects is Jenkinsfile.
  • JENKINS-34237 GitHub Organizations and GitHub User Accounts are searched using insensitive case
  • JENKINS-33318 GitHub Enterprise server validation with private mode enabled
  • JENKINS-33305 Branch name filters at GitHub Organization folder level

Version 1.5 (Apr 11, 2016)

Version 1.4 (Mar 14, 2016)

  • JENKINS-33256 The ability to build pull requests to public repositories was restored. In the case of multibranch Pipeline projects, for submitters who are not collaborators on the repository, the PR will be built, but using the Jenkinsfile from the base branch.
  • Implemented some caching of GitHub API calls to improve performance.
  • JENKINS-33309 Implementing an API to list metadata about a pull request; also available as environment variables during a build, and from the REST API for a job.
  • JENKINS-33183 Fix usage of anonymous scan credentials. (Still inadvisable due to GitHub rate limits.)
  • Need an Add button under Checkout credentials.
  • Sorting repositories in the GitHub branch source configuration screen.
  • Miscellaneous UX improvements, including error messages.

Version 1.3 (Feb 26, 2015)

  • Only pull requests in private GitHub repositories are built.

Version 1.2 (Feb 19, 2015)

Version 1.1 (Dec 17, 2015)

  • JENKINS-31574 Improve validation for Scan Credentials and anonymous is allowed in Scan Credentials.
  • JENKINS-31462 GitHub Enterprise Servers validation.

Version 1.0 (Nov 12, 2015)

Version 0.1-beta-1 (Oct 20, 2015)

Initial release.


  1. Unknown User (efmoyano)

    Hi folks, i'm working with a huge repo, about (2,5 GB), and i enabled the "Build fork PRs (merged with base branch" functionality in order to link the repo with the build to validate the code in the pull request. My problem is that jenkins is creating another folder and cloning the whole repo again in a folder inside the workspace and it's doing for every pull request that i open. Is there any possibility to set a custom subdirectory inside the workspace to avoid the re-cloning the repo and force all the pull request to perform the build actions inside the "pull request validation folder"? 

    I will appreciate any help. Thanks.


  2. Unknown User (pnovotnak)

    How does one get contributor permissions working? I'd like developers to be able to stop and start builds through the UI.

  3. Unknown User (jamlev)

    I am curious, in Github Enterprise 2.13.12, there is a distinction between Active branches and Stale branches with urls to each in the form of https.../artifact/branches/active  & https.../artifact/branches/stale, respectively. I would like to be able to set the plugin's Discover Branches Behavior to Active only. That way, an Orphaned Item Strategy would remove any Stale branches as they became stale and I would only be building my Active branches. Is this possible? Is it worth considering for an enhancement? Thanks.

  4. Unknown User (dev_joel)

    Hello guys,

    Maybe a low level question but we are using GitHub Branch Source Plugin (2.4.1)

    We currently have installed Git Plugin (3.9.1) too

    I wanted to confirm what are the environment variables we have access to in regards to the git repos when using the Github Branch Source Plugin to scan an entire organization.

    Are there any reserved variables for commit SHA (id) , author, timestamp, branch name?

    Thanks in advance for the answer.

    From what i've been able to see this is a great community, Congrats and thanks for the hard work and support

  5. Unknown User (vitaly_il)

    Into "Branch Sources" GitHub credentials we use my Github personal token. The problem that all  Jenkins statuses are marked by my user's icon.

    Where/How I can modify this icon to some system, not 'personal' one? 

  6. Unknown User (silverorange)

    I have been experiencing problems since the most recent update of this plugin to 2.5.0.  I'm running the latest Jenkins with all plugins updated.  After updating from 2.4.5 of this plugin to 2.5.0 my tests are failing with the following error.  As soon as I roll the plugin back to 2.4.5 the tests being passing again.  Anyone have any idea what might be causing this?

    Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"No commit found for SHA: xxxxxxxxxxxxxxdc556f036","documentation_url":"https://developer.github.com/v3/repos/commits/#get-a-single-commit"}

    1. Unknown User (bitwiseman)

      Please open a JIRA issue for this with details about your configuration, pipeline, and what you might by "tests are failing".  

      You can aslo come on over to https://gitter.im/jenkinsci/jenkins and discuss.


    2. Unknown User (bitwiseman)

      This  issue was fixed in v2.5.1 with you help, thanks!