Skip to content

Commit 8a6db6d

Browse files
committed
fix: improve script
1 parent 4891cb8 commit 8a6db6d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/github-action/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ async function run() {
1919

2020
const githubToken = core.getInput('github_token');
2121

22-
const [owner, repo] = core.getInput('repo').split('/');
23-
const number = github.context.issue.number;
22+
const number = github.context.payload.pull_request.number;
2423

2524
const octokit = github.getOctokit(githubToken);
2625
await octokit.rest.issues.addLabels({
2726
labels,
28-
owner,
29-
repo,
27+
owner: github.context.repo.owner,
28+
repo: github.context.repo.repo,
3029
issue_number: number
3130
});
3231
} catch (e) {

0 commit comments

Comments
 (0)