Skip to content

Commit bfaba84

Browse files
committed
fix: prepend main branch name to PR branch for better organization
1 parent b89993d commit bfaba84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

updater/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ runs:
129129
run: |
130130
if ([string]::IsNullOrEmpty($env:TARGET_BRANCH)) {
131131
$mainBranch = $(git remote show origin | Select-String "HEAD branch: (.*)").Matches[0].Groups[1].Value
132+
$prBranchPrefix = ''
132133
} else {
133134
$mainBranch = $env:TARGET_BRANCH
135+
$prBranchPrefix = "$mainBranch-"
134136
}
135-
$prBranch = switch ($env:PR_STRATEGY)
137+
$prBranch = $prBranchPrefix + switch ($env:PR_STRATEGY)
136138
{
137139
'create' { "deps/$env:DEPENDENCY_PATH/${{ steps.target.outputs.latestTag }}" }
138140
'update' { "deps/$env:DEPENDENCY_PATH" }

0 commit comments

Comments
 (0)