Skip to content

Commit 4ec6770

Browse files
authored
fix: use the add label API rather than patching the entire issue (#89)
1 parent 1c34223 commit 4ec6770

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/github.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ github::add_label_to_pr() {
8484
curl -sSL \
8585
-H "Authorization: token $GITHUB_TOKEN" \
8686
-H "$GITHUB_API_HEADER" \
87-
-X PATCH \
87+
-X POST \
8888
-H "Content-Type: application/json" \
8989
-d "{\"labels\":[$comma_separated_labels]}" \
90-
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number" >/dev/null
90+
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/labels" >/dev/null
9191
}
9292

9393
github::format_labels() {

0 commit comments

Comments
 (0)