Skip to content

Commit

Permalink
fix: auto_merge_approve_pr.yml 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minjungw00 committed Nov 11, 2024
1 parent 318e649 commit 9b046ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/auto_merge_approved_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
return JSON.stringify(pr);
core.setOutput('result', JSON.stringify(pr));
- name: "Check Approvals"
id: check
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = JSON.parse(steps.pr.outputs.result);
const pr = JSON.parse(`${{ steps.pr.outputs.result }}`);
const reviews = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -36,7 +36,7 @@ jobs:
const approvals = reviews.data.filter(review => review.state === 'APPROVED');
core.setOutput('result', approvals.length >= 2);
- name: "Merge PR"
if: steps.check.outputs.result
if: ${{ steps.check.outputs.result == 'true' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 9b046ca

Please sign in to comment.