Attempting to grab source branch name

This commit is contained in:
Chase King 2025-03-05 10:57:27 -05:00
parent 057727e9ac
commit 745d7322cd

View file

@ -142,7 +142,7 @@ stages:
tags: $(imageTag)
arguments: '--no-cache --pull'
- bash: |
branch_name=$(git name-rev --name-only --refs="refs/remotes/origin/*" HEAD^1 | sed 's/~.*//') # Had to do it this way because Build.SourceBranchName is always 'merge' on PR
branch_name=$(System.PullRequest.SourceBranch)
echo "Retrieved branch name: '$branch_name'"
jira_card_number="${branch_name##*/}" # Grab everything after last '/'
# Create container for jira writeback