Skip to content

Commit

Permalink
Merge pull request #31 from saschanaz/patch-1
Browse files Browse the repository at this point in the history
Use `issues.update` for closing both issues and PRs
  • Loading branch information
orta committed Aug 29, 2021
2 parents b94dd7b + 179a1b9 commit d748ec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class Actor {
const { octokit, thisRepo, issue, sender } = this;

core.info(`Creating comments and closing`)
await octokit.pulls.update({ ...thisRepo, pull_number: issue.number, state: "closed" });
await octokit.issues.createComment({ ...thisRepo, issue_number: issue.number, body: `Closing because @${sender} is a code-owner of all the changes.` });
await octokit.issues.update({ ...thisRepo, issue_number: issue.number, state: "closed" });
await octokit.issues.createComment({ ...thisRepo, issue_number: issue.number, body: `Closing because @${sender} is one of the code-owners of this repository.` });
}
}

Expand Down

0 comments on commit d748ec3

Please sign in to comment.