From 8a6db6d3f72aa276d76779fbb09deb7a5c973ef0 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 25 Apr 2024 16:24:40 +0200 Subject: [PATCH] fix: improve script --- .github/github-action/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/github-action/index.js b/.github/github-action/index.js index a35a2cb..9018b43 100644 --- a/.github/github-action/index.js +++ b/.github/github-action/index.js @@ -19,14 +19,13 @@ async function run() { const githubToken = core.getInput('github_token'); - const [owner, repo] = core.getInput('repo').split('/'); - const number = github.context.issue.number; + const number = github.context.payload.pull_request.number; const octokit = github.getOctokit(githubToken); await octokit.rest.issues.addLabels({ labels, - owner, - repo, + owner: github.context.repo.owner, + repo: github.context.repo.repo, issue_number: number }); } catch (e) {