Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry-Hong committed Oct 24, 2024
1 parent 6fd2f6b commit be2b897
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/on-issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: checkout-branch
uses: actions/checkout@v3

- name: check-comment
id: check-comment
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const result = await github.rest.pulls.listReviewComments({
owner: 'Henry-Hong',
repo: 'i-am-not-a-junior-frontend',
pull_number: 2,
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
const recentComment = result.data?.at(-1).body;
if(recentComment.includes('NTC')) return true;
else return false;
- name: checkout-branch
uses: actions/checkout@v3

- name: make-this-pr-to-draft
if: ${{ steps.check-comment.outputs.result == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr ready --undo 2
run: gh pr ready --undo ${{ github.event.pull_request.number }}
# github.rest.pulls.listReviewComments({
# owner: context.repo.owner,
# repo: context.repo.repo,
Expand Down

0 comments on commit be2b897

Please sign in to comment.