Jenkins : GitHub Branch Source Plugin

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 - Configurable webhook URL Resolved  - Configurable webhook URL 

JENKINS-57557 - JCasC: Branch discovery traits failure in config roundtrips (strategyId) Closed  - Add test for JCasC compatibility

JENKINS-59321 - github-branch-source plugin throws InvocationTargetException when creating Reopened  - 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 - Github Branch Source Plugin always references Closed  - Fix NPE when web hook triggers build on tag delete

Version 2.5.6 (August 15, 2019)

JENKINS-58862 - Github Branch Source Plugin always references Closed  - Fixed an issue where new projects using GitHub Enterprise servers were being incorrectly configured to use

Version 2.5.5 (July 26, 2019)

JENKINS-50999 - Repository Branch DropDown timesout Resolved  - 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 - Shared Library using folder-scoped credential fails to authenticate Resolved  - Support Shared Library using folder-scoped credentials 

JENKINS-42443 - f:select should show a spinner while AJAX requests are in-flight Closed  - 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 - "Ignore target branch" no longer working Closed  - Fixed compatibility with the "Ignore target brach" setting

JENKINS-57371 - error message when building PR Closed  - Added graceful fallback to cloning for PRs when needed 

Version 2.5.2 (May 8, 2019)

JENKINS-56996 - null permission lookup when pull-request's origin repo/branch is deleted on github Resolved  - 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 - No commit found for SHA after updating github branch source plugin Closed  - 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 - Lightweight checkout for PR merge jobs Closed  - Lightweight checkout for PR merge jobs.

Version 2.4.5 (March 27, 2019)

  • Doc fixes #194 #184 #196 #201
  • JENKINS-45504 - Add @Symbol annotations to traits Closed  #183
  • JENKINS-44715 - Pipeline plugin won't get updated PR github title Resolved  #192
  • Fixed a potential problem when descovering mixed case Jenkinsfile #198
  • JENKINS-54126 - Jenkinsfile not found in PR on GitHub -- Does not meet criteria Closed  Diagnostics; surface a potential cause to the scan log #200
  • list github orgs #187
  • JENKINS-46094 - "Checkout over SSH" fails the build since it still uses HTTPS urls Closed
  • JENKINS-54051 - GitHub-Branch-Source plugin 2.3.5 Security Update causing error in adding GitHub Enterprise Servers Resolved

Version 2.4.2 (Jan 16, 2019)

  • JENKINS-52397 - Org Scan blows up when repository has no tags Closed
  • INFRA-1934 - Stop publishing to jenkinsci/jenkins repo on Docker Hub Resolved

Version 2.4.1 (Oct 15, 2018)

  • JENKINS-54046 - GitHub branch souce plugin fails to move temporary files Closed  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 - PullRequestSCMHead and PullRequestSCMRevision external use Closed
  • 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)

  • JENKINS-47366 - Checkout in second stage sets SUCCESS on Github commit Closed

Version 2.3.5 (June 4, 2018)

Version 2.3.4 (April 20, 2018)

Version 2.3.3 (March 14, 2018)

  • JENKINS-49945 - PR matching regex can never match strategies Resolved
  • 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 - Add option to choose static notification context Resolved  Allow extension plugins to control the notification context (contributed by Steven Foster)
  • JENKINS-47585 - Implement changesSince in GitHubSCMFileSystem Resolved  Add support for lightweight changelog
  • JENKINS-48035 - Github multibranch: GitHub Webhook is not created right after saving the job Closed  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 - "No version master found for library" after upgrade to 2.3.0 Closed  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 - Support for building tags Closed  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 - git plugin 3.6.3 lost support for tagged pipeline shared libraries Closed  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 - Optimized event processing of pull requests does not detect closed PRs as closed Closed  Fix optimized event processing of PRs that have been closed.

Version 2.2.4 (October 20, 2017)

  • JENKINS-46967 - Upgrade parent POM and upgrade the baseline for github-branch-source Closed  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 - NPE on build PR head revision Closed  NPE on build PR head revision
  • JENKINS-46203 - Add LICENSE file to GitHub repo of plugin Closed  Add a LICENSE file to github repo
  • JENKINS-46295 - Events handling for deleted branches can blow up In Review  Event handling could blow up where a query optimization is attempted for a deleted branch
  • JENKINS-46364 - GitHub Branch Source Plugin can't create status if credential restricted by spec Closed  GitHub Branch Source Plugin can't create status if credential restricted by spec

Version 2.2.3 (July 28, 2017)

  • JENKINS-45771 - Disable shallow clone when we know a merge will take place Open  Disable shallow clone when we know a merge will take place.

Version 2.2.2 (July 20, 2017)

  • JENKINS-36240 - Default repository permission are not considered Closed  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.