jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-51146] Github Branch Source does not allow `#` character within branch names

Open
#1,187 0 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

Something happened within the update of Github branch source plugin 2.3.0 update when combined with the update to Jenkins core 2.73.x where when you have a branch with a # character in the name it will not be able to find the branch name.

 

Steps to recreate:



  1. Create a shared library with a branch name "Branch#Test"

  2. Attach that shared library to a Jenkins instance as a global library using the github modern SCM

  3. Create a job which loads the branch by doing @​Library(SharedLibrary@​Branch#Test)

  4. observe the job fails with 

    No version Branch#Test found for library GithubLibrary

This issue only happens when you update the github branch source plugin to newer than 2.3.0 and have a current version of core(from my testing) which means something in the 2.3.0 release changed this behavior.

 

Let me know if I can provide more information

---
Originally reported by ataylor, imported from: Github Branch Source does not allow `#` character within branch names


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

Something happened within the update of Github branch source plugin 2.3.0 update when combined with the update to Jenkins core 2.73.x where when you have a branch with a # character in the name it will not be able to find the branch name.

 

Steps to recreate:



  1. Create a shared library with a branch name "Branch#Test"

  2. Attach that shared library to a Jenkins instance as a global library using the github modern SCM

  3. Create a job which loads the branch by doing @Library(SharedLibrary@Branch#Test)

  4. observe the job fails with 
    No version Branch#Test found for library GithubLibrary

This issue only happens when you update the github branch source plugin to newer than 2.3.0 and have a current version of core(from my testing) which means something in the 2.3.0 release changed this behavior.

 

Let me know if I can provide more information

environment

```
Jenkins core at least 2.73.x LTS

Github Branch source 2.3.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.