From e0570837be10f161bcba8d69b75910db3326ca1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manish=20Kumar=20=E2=9B=84?= Date: Thu, 31 Oct 2024 16:50:30 +0900 Subject: [PATCH] fix: use the add label API rather than patching the entire issue --- src/github.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.sh b/src/github.sh index a44f89d..58de4ce 100644 --- a/src/github.sh +++ b/src/github.sh @@ -84,10 +84,10 @@ github::add_label_to_pr() { curl -sSL \ -H "Authorization: token $GITHUB_TOKEN" \ -H "$GITHUB_API_HEADER" \ - -X PATCH \ + -X POST \ -H "Content-Type: application/json" \ -d "{\"labels\":[$comma_separated_labels]}" \ - "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number" >/dev/null + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/labels" >/dev/null } github::format_labels() {