jenkinsci / jenkinsci/git-plugin

[JENKINS-8014] Excluded-regions doesn't work properly with merges

Open
#1,965 0 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Until the included-regions feature is ready, we're using excluded-regions with a negative regexp to simulate it. example: ^(?!plugins/my-plugin-0.1\/).+$

We have the git plugin building straight off a branch and are not using merge before build. The behavior I'm seeing is that if I push commits directly to that branch this works great, but if the HEAD of that branch refers to a merge commit, the build ALWAYS thinks it ought to build, even if no changes were registered that weren't excluded by the regexp.

---
Originally reported by sirlyric, imported from: Excluded-regions doesn't work properly with merges


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • label(s): GitSCMExtension, git-plugin-PathRestriction
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

Until the included-regions feature is ready, we're using excluded-regions with a negative regexp to simulate it. example: ^(?!plugins/my-plugin-0.1\/).+$

We have the git plugin building straight off a branch and are not using merge before build. The behavior I'm seeing is that if I push commits directly to that branch this works great, but if the HEAD of that branch refers to a merge commit, the build ALWAYS thinks it ought to build, even if no changes were registered that weren't excluded by the regexp.

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.