lock-inactive-threads #508
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
# Lock Inactive Threads | |
# | |
# References: | |
# | |
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#schedule | |
# - https://github.com/actions/create-github-app-token | |
# - https://github.com/dessant/lock-threads | |
# - https://github.com/hmarr/debug-action | |
--- | |
name: lock-inactive-threads | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
env: | |
LABEL: status:stale | |
jobs: | |
lock-inactive-threads: | |
runs-on: ubuntu-latest | |
steps: | |
- id: debug | |
name: Print environment variables and event payload | |
uses: hmarr/[email protected] | |
- id: bot-token | |
name: Get bot token | |
uses: actions/[email protected] | |
with: | |
app-id: ${{ secrets.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- id: lock | |
name: Lock inactive issues and pull requests | |
uses: dessant/[email protected] | |
with: | |
add-issue-labels: ${{ env.LABEL }} | |
add-pr-labels: ${{ env.LABEL }} | |
github-token: ${{ steps.bot-token.outputs.token }} | |
issue-comment: | | |
This issue has been automatically locked since there has not been any recent activity | |
after it was closed. Please open a new issue for related bugs or features. Be sure to | |
reference this issue. | |
issue-inactive-days: 60 | |
pr-comment: | | |
This pull request has been automatically locked since there has not been any recent | |
activity after it was closed. Please open a new issue for related bugs or features. Be | |
sure to reference this issue. | |
pr-inactive-days: 60 |