feat(ci): autolocker (#192)

This commit is contained in:
GeopJr 2022-05-10 15:40:51 +03:00 committed by GitHub
parent 6bd9041555
commit f2c551cb4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
.github/workflows/autolocker.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Autolocker
on:
pull_request:
types: [closed]
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: |
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"]
})