Repository navigation
79 lines (71 loc) · 2.33 KB
/
Copy pathissue-claim.yml
File metadata and controls
79 lines (71 loc) · 2.33 KB
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
name: Issue claim automation
on:
issue_comment:
types: [created]
issues:
types: [closed, unlabeled, unassigned]
schedule:
- cron: '17 2 * * *'
workflow_dispatch:
permissions:
contents: read
issues: write
pull-requests: read
jobs:
command:
name: Process claim command
if: >-
github.event_name == 'issue_comment' &&
github.event.issue.pull_request == null &&
contains(fromJSON('["/claim", "/unclaim", "/renew", "/claim status"]'), github.event.comment.body)
concurrency:
group: issue-claim-${{ github.repository }}
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the default branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Process command
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node script/github/issue-claim.js event
cleanup:
name: Reconcile unpublished claims
if: github.event_name == 'issues'
concurrency:
group: issue-claim-${{ github.repository }}-cleanup-${{ github.event.issue.number }}
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the default branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Reconcile claim
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node script/github/issue-claim.js cleanup
sweep:
name: Release expired claims
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
concurrency:
group: issue-claim-${{ github.repository }}
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out the default branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Release expired claims
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node script/github/issue-claim.js sweep