-
-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (50 loc) · 1.98 KB
/
stale.yml
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
name: Stale
on:
schedule:
- cron: 0 0 * * *
issue_comment:
types:
- created
workflow_dispatch:
env:
AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
stale:
if: false # github.repository_owner == 'ShineyDev' && ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' ) # TODO(actions): put this back
name: Mark as stale
runs-on: ubuntu-latest
steps:
- name: Stale
uses: actions/stale@v9
with:
repo-token: ${{ env.AUTH_TOKEN }}
days-before-stale: 30
days-before-close: 14
exempt-issue-labels: A:backlog
stale-issue-label: A:stale
stale-issue-message: |-
This issue has been marked as stale due to its inactivity and will be closed in 14 days.
If you believe the issue should remain open, remove the `A:stale` label or add a comment.
If you believe the issue will continue to be inactive but should remain open, add the `A:backlog` label.
exempt-pr-labels: A:backlog
stale-pr-label: A:stale
stale-pr-message: |-
This pull request has been marked as stale due to its inactivity and will be closed in 14 days.
If you believe the pull request should remain open, remove the `A:stale` label or add a comment.
If you believe the pull request will continue to be inactive but should remain open, add the `A:backlog` label.
unstale:
if: github.repository_owner == 'ShineyDev' && github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'A:stale') && github.event.issue.user.type != 'Bot'
name: Unmark as stale
runs-on: ubuntu-latest
steps:
- name: Unstale
uses: actions/github-script@v7
with:
github-token: ${{ env.AUTH_TOKEN }}
script: |-
github.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'A:stale'
})