jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-53219] Don't run build if merge commit is same as PR head (Github branch source)

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

Description

We currently have the option enabled to build both PR head as well as the PR merge. I would prefer the PR merge to not do anything if merging the target branch into the PR doesn't create a new commit because the PR was already built on top of the latest commit from the target branch.

This way if developers create a branch from master, and then add commits, only a single build is run, rather than two.

---
Originally reported by xistence, imported from: Don't run build if merge commit is same as PR head (Github branch source)


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

Raw content of original issue

We currently have the option enabled to build both PR head as well as the PR merge. I would prefer the PR merge to not do anything if merging the target branch into the PR doesn't create a new commit because the PR was already built on top of the latest commit from the target branch.

This way if developers create a branch from master, and then add commits, only a single build is run, rather than two.

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.