aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/lifecycle.yml
blob: a52c64661cf40cbfb05148ac8a57b3b8d7dc0a4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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 }}