Skip to content

Commit

Permalink
Fix use of API for calling addLabels and fix labeler on gz-utils (#50)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Dec 6, 2024
1 parent 7271ec5 commit 574982d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 574982d

Please sign in to comment.