diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cron.yml | 29 | ||||
-rw-r--r-- | .github/workflows/lifecycle.yml | 95 |
2 files changed, 99 insertions, 25 deletions
diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 6d136a14..fb66a649 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,31 +1,10 @@ name: cron on: - workflow_dispatch: schedule: - - cron: '0 0 * * *' # every day at 00:00 + - cron: '17 3 * * *' # every day at 03:17 UTC jobs: - stale: - name: stale/issue-and-pr - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v9 - with: - stale-issue-label: lifecycle/stale - stale-pr-label: lifecycle/stale - days-before-stale: 90 - days-before-close: 30 - stale-issue-message: | - This bot triages untriaged issues and PRs according to the following rules: - - - After 90 days of inactivity, the `lifecycle/stale` label is applied - - After 30 days of inactivity since `lifecycle/stale` was applied, the issue is closed - - To remove the stale status, you can: - - - Remove the `lifecycle/stale` label - - Comment on this issue + lifecycle: + if: github.event.schedule == '17 3 * * *' + uses: ./.github/workflows/stale-bot.yml diff --git a/.github/workflows/lifecycle.yml b/.github/workflows/lifecycle.yml new file mode 100644 index 00000000..a52c6466 --- /dev/null +++ b/.github/workflows/lifecycle.yml @@ -0,0 +1,95 @@ +name: lifecycle + +on: + workflow_call: + inputs: + issue-message: + type: string + default: | + This bot triages issues in order to help the maintainers identify what + needs attention, according to the following lifecycle rules: + + - After 90 days of inactivity, `lifecycle/stale` is applied + - After 90 days of inactivity since `lifecycle/stale` was applied, + `lifecycle/rotten` is applied + + **This bot will not automatically close stale issues.** + + To remove the stale status, you can: + + - Remove the stale label from this issue + - Comment on this issue + - Close this issue + - Offer to help out with triaging + + --- + + To avoid automatic lifecycle management of this issue, add + `lifecycle/frozen`. + + pr-message: + type: string + default: | + This bot triages pull requests in order to help the maintainers + identify what needs attention, according to the following lifecycle + rules: + + - After 90 days of inactivity, `lifecycle/stale` is applied + - After 90 days of inactivity since `lifecycle/stale` was applied, + `lifecycle/rotten` is applied + + **This bot will not automatically close stale pull requests.** + + To remove the stale status, you can: + + - Remove the stale label from this pull request + - Comment on this issue + - Close this issue + - Offer to help out with triage and code review + + --- + + To avoid automatic lifecycle management of this pull request, add + `lifecycle/frozen`. + +jobs: + stale: + name: stale + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + days-before-close: -1 + days-before-stale: 90 + exempt-all-milestones: true + exempt-issue-labels: lifecycle/frozen,lifecycle/rotten,lifecycle/stale + exempt-pr-labels: lifecycle/frozen,lifecycle/rotten,lifecycle/stale + labels-to-remove-when-stale: lifecycle/active + stale-issue-label: lifecycle/stale + stale-issue-message: ${{ inputs.issue-message }} + stale-pr-label: lifecycle/stale + stale-pr-message: ${{ inputs.pr-message }} + + rotten: + name: rotten + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + days-before-close: -1 + days-before-stale: 180 + exempt-all-milestones: true + labels-to-remove-when-stale: lifecycle/active,lifecycle/stale + exempt-issue-labels: lifecycle/frozen + exempt-pr-labels: lifecycle/frozen + only-labels: lifecycle/stale + stale-issue-label: lifecycle/rotten + stale-issue-message: ${{ inputs.issue-message }} + stale-pr-label: lifecycle/rotten + stale-pr-message: ${{ inputs.pr-message }} |