|
| 1 | +name: Close stale issues and PRs |
| 2 | +on: |
| 3 | + workflow_call: |
| 4 | + inputs: |
| 5 | + days-before-stale: |
| 6 | + description: "Days of inactivity before marking as stale" |
| 7 | + type: number |
| 8 | + required: false |
| 9 | + default: 90 |
| 10 | + days-before-close: |
| 11 | + description: "Days of inactivity before closing stale issues/PRs" |
| 12 | + type: number |
| 13 | + required: false |
| 14 | + default: 30 |
| 15 | + exempt-issue-labels: |
| 16 | + description: "Comma-separated list of labels that exempt issues from being marked as stale" |
| 17 | + type: string |
| 18 | + required: false |
| 19 | + default: "" |
| 20 | + exempt-pr-labels: |
| 21 | + description: "Comma-separated list of labels that exempt PRs from being marked as stale" |
| 22 | + type: string |
| 23 | + required: false |
| 24 | + default: "" |
| 25 | + stale-issue-message: |
| 26 | + description: "Message to post when marking an issue as stale" |
| 27 | + type: string |
| 28 | + required: false |
| 29 | + default: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." |
| 30 | + stale-pr-message: |
| 31 | + description: "Message to post when marking a PR as stale" |
| 32 | + type: string |
| 33 | + required: false |
| 34 | + default: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." |
| 35 | + close-issue-message: |
| 36 | + description: "Message to post when closing a stale issue" |
| 37 | + type: string |
| 38 | + required: false |
| 39 | + default: "This issue has been automatically closed due to inactivity. Please feel free to reopen if you would like to continue working on this." |
| 40 | + close-pr-message: |
| 41 | + description: "Message to post when closing a stale PR" |
| 42 | + type: string |
| 43 | + required: false |
| 44 | + default: "This pull request has been automatically closed due to inactivity. Please feel free to reopen if you would like to continue working on this." |
| 45 | + |
| 46 | +jobs: |
| 47 | + stale: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + permissions: |
| 50 | + issues: write |
| 51 | + pull-requests: write |
| 52 | + steps: |
| 53 | + - name: Close stale issues and PRs |
| 54 | + uses: actions/stale@v10.2.0 |
| 55 | + with: |
| 56 | + days-before-stale: ${{ inputs.days-before-stale }} |
| 57 | + days-before-close: ${{ inputs.days-before-close }} |
| 58 | + exempt-issue-labels: ${{ inputs.exempt-issue-labels }} |
| 59 | + exempt-pr-labels: ${{ inputs.exempt-pr-labels }} |
| 60 | + stale-issue-message: ${{ inputs.stale-issue-message }} |
| 61 | + stale-pr-message: ${{ inputs.stale-pr-message }} |
| 62 | + close-issue-message: ${{ inputs.close-issue-message }} |
| 63 | + close-pr-message: ${{ inputs.close-pr-message }} |
| 64 | + stale-issue-label: "stale" |
| 65 | + stale-pr-label: "stale" |
| 66 | + exempt-draft-pr: true |
0 commit comments