Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Aug 27, 2023
1 parent 819ed49 commit 7a1eb2c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
15 changes: 10 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ const main = async () => {

if (result.merge) {
// approve the pr
await patOctokit.rest.pulls.createReview({
...github.context.repo,
pull_number: github.context.issue.number,
event: 'APPROVE'
})
try {
await patOctokit.rest.pulls.createReview({
...github.context.repo,
pull_number: github.context.issue.number,
event: 'APPROVE'
})
} catch (e) {
console.log('Unable to approve PR', e)
}

await patOctokit.rest.pulls.merge({
...github.context.repo,
Expand Down

0 comments on commit 7a1eb2c

Please sign in to comment.