jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-48226] MultiBranch doesn't distinguish Branches and PRs

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

Description

jenkins.branch.Branch#getName uses head.getName

That ends that branch name equals PR name makes branch api crazy.

As example your github-branchsource-plugin https://ci.jenkins.io/job/Plugins/job/github-plugin/job/PR-182/ after branch appeared in Branches it disappeared in PullRequests and mixined build history.

And guess revision https://ci.jenkins.io/job/Plugins/job/github-plugin/job/PR-182/5/

Normally SCMCategories must be part of branch names or at all subfolders. And the easiest: enforce implementations to deal themselves with prefixes (that ideally are categories).

---
Originally reported by integer, imported from: MultiBranch doesn't distinguish Branches and PRs


  • status: Reopened
  • priority: Blocker
  • component(s): branch-api-plugin, github-branch-source-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

jenkins.branch.Branch#getName uses head.getName
That ends that branch name equals PR name makes branch api crazy.
As example your github-branchsource-plugin https://ci.jenkins.io/job/Plugins/job/github-plugin/job/PR-182/ after branch appeared in Branches it disappeared in PullRequests and mixined build history.

And guess revision https://ci.jenkins.io/job/Plugins/job/github-plugin/job/PR-182/5/

Normally SCMCategories must be part of branch names or at all subfolders. And the easiest: enforce implementations to deal themselves with prefixes (that ideally are categories).

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.