superlint/.github/workflows/stale.yml

56 lines
2.5 KiB
YAML
Raw Normal View History

2020-07-02 13:46:30 -04:00
---
2020-07-02 13:30:44 -04:00
on:
schedule:
# every day at 0:00 UTC
- cron: "0 0 * * *"
issue_comment:
types: [created, deleted, edited]
2020-07-02 13:46:30 -04:00
name: "Stale[bot]"
2020-07-02 13:30:44 -04:00
# Don't grant any access by default
permissions: {}
2020-07-02 13:30:44 -04:00
jobs:
markstale:
permissions:
2024-08-15 04:21:26 -04:00
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
2020-07-02 13:30:44 -04:00
runs-on: ubuntu-latest
# only run on schedule
if: ${{ github.event_name == 'schedule' }}
2021-11-15 11:25:36 -05:00
timeout-minutes: 60
2020-07-02 13:30:44 -04:00
steps:
- name: Mark issue stale
uses: actions/stale@v9
2020-07-02 13:30:44 -04:00
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue.\n\nIf you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the `O: backlog 🤖` label`."
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this pull request should stay open, please remove the `O: stale 🤖` label or comment on the pull request.\n\nIf you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the `O: backlog 🤖` label`."
2020-07-02 13:30:44 -04:00
days-before-stale: 30
days-before-close: 14
stale-issue-label: "O: stale 🤖"
exempt-issue-labels: "O: backlog 🤖"
2020-07-02 13:30:44 -04:00
stale-pr-label: "O: stale 🤖"
exempt-pr-labels: "O: backlog 🤖"
2020-07-02 13:30:44 -04:00
marknotstale:
permissions:
2024-08-15 04:21:26 -04:00
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
2020-07-02 13:30:44 -04:00
runs-on: ubuntu-latest
# do not run on schedule
if: "${{ github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'O: stale 🤖') && github.event.issue.user.type != 'Bot' }}"
2021-11-15 11:25:36 -05:00
timeout-minutes: 60
2020-07-02 13:30:44 -04:00
steps:
- name: Mark issue not stale
uses: actions/github-script@v7
2020-07-02 13:30:44 -04:00
with:
script: |
2021-10-04 14:17:02 -04:00
github.rest.issues.removeLabel({
2020-07-02 13:30:44 -04:00
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'O: stale 🤖'
})