[BOOK] 우리학교 김선생님 - 복슬 글그림 2019 #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Force delete unauthorized writer's issue | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
close-issue: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- if: github.event.issue.user.login != github.repository_owner | |
name: Delete Issue | |
run: gh issue delete $NUMBER --yes | |
env: | |
#GH_TOKEN: ${{ github.token }} | |
GH_TOKEN: ${{ secrets.ISSUE_CLOSE_TOKEN }} # admin role for delet | |
GH_REPO: ${{ github.repository }} | |
NUMBER: ${{ github.event.issue.number }} | |
#uses: peter-evans/[email protected] | |
#with: | |
# close-reason: not_planned | |
# comment: only the owner can post. |