jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-53451] Exclude branches that are also filed as PRs doesn't exclude branches in include filter

Open
#1,203 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

We have a workflow where we merge our release branch back into our master branch periodically. To do this, we create a PR that merges the release branch back to master. Our configuration is setup to use the "Exclude branches that are also filed as PRs" branch discovery strategy, but it builds these "branch"-type status checks for these kind of "merge release by back to master" PRs anyway. I believe it's because the commit in the PR is in a branch that's in the include filter (the release branch): "release/*" (matches our release branches) is in the include filter.

 

Ideally, PRs wouldn't build trigger this extra build, which is typically only run a commit lands on the release branch.

---
Originally reported by benasher44, imported from: Exclude branches that are also filed as PRs doesn't exclude branches in include filter


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

Raw content of original issue

We have a workflow where we merge our release branch back into our master branch periodically. To do this, we create a PR that merges the release branch back to master. Our configuration is setup to use the "Exclude branches that are also filed as PRs" branch discovery strategy, but it builds these "branch"-type status checks for these kind of "merge release by back to master" PRs anyway. I believe it's because the commit in the PR is in a branch that's in the include filter (the release branch): "release/*" (matches our release branches) is in the include filter.

 

Ideally, PRs wouldn't build trigger this extra build, which is typically only run a commit lands on the release branch.

environment

```
Jenkins 2.121.3

Github Branch Source Plugin 2.3.6
```

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.