TmpMenu/.github/workflows/autolocker.yml

25 lines
668 B
YAML
Raw Normal View History

2022-05-10 20:40:51 +08:00
name: Autolocker
on:
pull_request_target:
2022-05-10 20:40:51 +08:00
types: [closed]
permissions: write-all
2022-05-10 20:40:51 +08:00
jobs:
autolock:
# if: ${{ github.event.pull_request.merged }} # Uncomment if you want it to run only when a PR gets MERGED
runs-on: ubuntu-latest
name: Autolocker
steps:
- name: Autolock PRs that got merged or closed
uses: actions/github-script@v6
with:
script: |
2022-05-10 20:40:51 +08:00
github.rest.issues.lock({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
lock_reason: "resolved" // ["off-topic", "too heated", "resolved", "spam"]
})