From 574982d4470ade730e89d00f15e3bd5edd5a6bd2 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 6 Dec 2024 22:00:55 +0100 Subject: [PATCH] Fix use of API for calling `addLabels` and fix labeler on gz-utils (#50) Signed-off-by: Addisu Z. Taddese --- dist/index.js | 8 ++++---- index.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 92e33d8..2d4a537 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35974,8 +35974,8 @@ async function run(_local, _lib, _branch) { if (lib == undefined) { // TODO(chapulina) Remove this after gz rename is over - library = library.replace('gz', 'ign'); - lib = collectionYaml.repositories[library]; + const ign_library = library.replace('gz', 'ign'); + lib = collectionYaml.repositories[ign_library]; if (lib == undefined) { continue; @@ -36019,8 +36019,8 @@ async function run(_local, _lib, _branch) { if (!_local && labels.length > 0) { const prNumber = github.context.payload.pull_request.number; - core.debug(`Adding labels: [${labels}] to PR [${prNumber}]`); - gh.issues.addLabels( + core.notice(`Adding labels: [${labels}] to PR [${prNumber}]`); + gh.rest.issues.addLabels( Object.assign({issue_number: prNumber, labels: labels }, github.context.repo)); } diff --git a/index.js b/index.js index c0d9c82..715ab8a 100644 --- a/index.js +++ b/index.js @@ -53,8 +53,8 @@ async function run(_local, _lib, _branch) { if (lib == undefined) { // TODO(chapulina) Remove this after gz rename is over - library = library.replace('gz', 'ign'); - lib = collectionYaml.repositories[library]; + const ign_library = library.replace('gz', 'ign'); + lib = collectionYaml.repositories[ign_library]; if (lib == undefined) { continue; @@ -98,8 +98,8 @@ async function run(_local, _lib, _branch) { if (!_local && labels.length > 0) { const prNumber = github.context.payload.pull_request.number; - core.debug(`Adding labels: [${labels}] to PR [${prNumber}]`); - gh.issues.addLabels( + core.notice(`Adding labels: [${labels}] to PR [${prNumber}]`); + gh.rest.issues.addLabels( Object.assign({issue_number: prNumber, labels: labels }, github.context.repo)); }