Skip to content

Commit

Permalink
chore(build): fix package bump PR action (spinnaker#9995)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgogerly committed May 11, 2023
1 parent 39f70cc commit 61cbbf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/package-bump-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
script: |
const { owner, repo } = context.repo;
const pull_number = ${{ steps.createpullrequest.outputs.pull-request-number }};
await github.pulls.update({ owner, repo, pull_number, state: 'closed' });
await github.rest.pulls.update({ owner, repo, pull_number, state: 'closed' });
- name: Approve package bump
if: ${{ steps.lerna_bump.outputs.packageBumpCommitHash != '' && steps.createpullrequest.outputs.pull-request-number != '' }}
Expand All @@ -110,9 +110,9 @@ jobs:
const pull_number = ${{ steps.createpullrequest.outputs.pull-request-number }};
const users = ['spinnakerbot', 'spinnakerbot2'];
const reviews = await github.pulls.listReviews({ owner, repo, pull_number });
const reviews = await github.rest.pulls.listReviews({ owner, repo, pull_number });
const approved = reviews.data.some((review) => users.includes(review.user.login) && review.state == 'APPROVED');
if (!approved) {
await github.pulls.createReview({ owner, repo, pull_number, event: 'APPROVE' });
await github.rest.pulls.createReview({ owner, repo, pull_number, event: 'APPROVE' });
}

0 comments on commit 61cbbf0

Please sign in to comment.