File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ name: "Refresh pinned dependencies"
29
29
reset-branch :
30
30
type : boolean
31
31
default : false
32
+ labels :
33
+ type : string
34
+ default : " "
32
35
jobs :
33
36
refresh :
34
37
runs-on : ubuntu-latest
86
89
pr_branch : " ${{ inputs.pr-branch }}"
87
90
message : " ${{ inputs.message }}"
88
91
changed_files : " ${{ inputs.changed-files }}"
92
+ labels : " ${{ inputs.labels }}"
89
93
run : |
90
94
set -x
91
95
git diff || :
@@ -99,9 +103,18 @@ jobs:
99
103
git push --force origin "${pr_branch}"
100
104
if [ "${{ steps.branch.outputs.branch-exists }}" = "false" ]
101
105
then
102
- gh pr create \
103
- --base "${base_branch}" \
104
- --title "${message}" \
105
- --body "" \
106
+ command=( gh pr create
107
+ --base "${base_branch}"
108
+ --title "${message}"
109
+ --body ""
106
110
--label dependency_update
111
+ )
112
+ # Add custom labels to the command.
113
+ old_ifs="$IFS"
114
+ IFS=","
115
+ for label in ${labels}; do
116
+ command+=("--label" "${label}")
117
+ done
118
+ IFS="${old_ifs}"
107
119
fi
120
+ "${command[@]}"
You can’t perform that action at this time.
0 commit comments