Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Apr 16, 2020
1 parent 31709f2 commit 8ecdda3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ const github = __webpack_require__(469);
try {
const token = core.getInput("repo-token", { required: true });
const { assignees, number, user: { login: author } } = github.context.payload.pull_request;
const { owner: { login: owner }, name: repo, } = github.context.payload.repository;
const { name: repo, } = github.context.payload.repository;

if (assignees.length > 0) {
core.info('Skips the process to add assignees since the pull request is already assigned to someone');
Expand All @@ -518,11 +518,11 @@ try {

(async () => {
const client = new github.GitHub(token);
const result = await client.issues.addAssignees({ owner, repo, issue_number: number, assignees: [author] });
const result = await client.issues.addAssignees({ owner: github.repository_owner, repo, issue_number: number, assignees: [author] });
core.debug(JSON.stringify(result));
})();

core.info(`Added assignees to PR ${owner}/${repo}#${number}: ${author}`);
core.info(`Assigned @${author} to pull request #${number}`);
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 8ecdda3

Please sign in to comment.