jenkinsci / jenkinsci/git-plugin
[JENKINS-27426] Git Plugin should record the initial branch when completing a merge before build
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
When checking out a branch and then merging another branch into the branch, the original branch is lost.
Configure the job to checkout origin/develop. Add a merge before build to merge origin/master into the workspace. This causes git-plugin to checkout master and then merge develop into the workspace. The current branch is now master.
In the event that the original branch or commit needs to be passed to another job, this information is no longer available.
---
Originally reported by mattfirtioncoveros, imported from: Git Plugin should record the initial branch when completing a merge before build
Raw content of original issue
When checking out a branch and then merging another branch into the branch, the original branch is lost.
Configure the job to checkout origin/develop. Add a merge before build to merge origin/master into the workspace. This causes git-plugin to checkout master and then merge develop into the workspace. The current branch is now master.
In the event that the original branch or commit needs to be passed to another job, this information is no longer available.
Contributor guide
Assessment
This issue has not been assessed yet.