From d33d2323539360d0301b37d637f298d123b2c1ac Mon Sep 17 00:00:00 2001 From: Orta Date: Fri, 2 Jul 2021 18:46:36 +0100 Subject: [PATCH] Fix API for adding custom label --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e5db6be4..363a8c34 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const {readFileSync} = require("fs"); // Effectively the main function async function run() { - core.info("Running version 1.5.1") + core.info("Running version 1.5.4") // Tell folks they can merge if (context.eventName === "pull_request_target") { @@ -62,7 +62,7 @@ async function commentOnMergablePRs() { const labelToAdd = core.getInput('if_no_maintainers_add_label') if (labelToAdd) { const labelConfig = { name: labelToAdd, color: Math.random().toString(16).slice(2, 8) } - await createOrAddLabel(octokit, thisRepo, labelConfig) + await createOrAddLabel(octokit, { ...thisRepo, id: pr.number }, labelConfig) } const assignees = core.getInput('if_no_maintainers_assign')