jenkinsci / jenkinsci/git-plugin
[JENKINS-21421] GIT_BRANCH_SHORT for branch name without release/, feature/, etc. Just the bit after the '/'
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
For cases where a filename expansion is needed for the git branch name, thre cannot be a '/' in a filename, so that part of the branch needs to be dropped.
ie:
GIT_BRANCH=release/blue-fish
then:
GIT_BRANCH_SHORT=blue-fish
Seems like a simple thing to do in the plugin, but not possible to do in a job.
---
Originally reported by
bedge, imported from: GIT_BRANCH_SHORT for branch name without release/, feature/, etc. Just the bit after the '/'
Raw content of original issue
For cases where a filename expansion is needed for the git branch name, thre cannot be a '/' in a filename, so that part of the branch needs to be dropped.
ie:
GIT_BRANCH=release/blue-fish
then:
GIT_BRANCH_SHORT=blue-fishSeems like a simple thing to do in the plugin, but not possible to do in a job.
Contributor guide
Assessment
This issue has not been assessed yet.