This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
147 lines (137 loc) · 5.57 KB
/
project-management.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Project Management
concurrency:
group: ${{ github.event.issue.number || github.ref }}
cancel-in-progress: false
on:
issue_comment:
types:
- created
- edited
issues:
types:
- opened
- unlabeled
- assigned
- unassigned
schedule:
- cron: '0 0 * * *'
jobs:
assign-issue-to-contributor:
name: Assign Issue to Contributor
if: github.event_name == 'issue_comment' && !github.event.issue.pull_request && !contains(github.event.issue.labels.*.name, 'Triage') && github.event.issue.state == 'open'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
- name: Assign issue
uses: bdougie/take-action@main
with:
message: Danke, dass Du diese Aufgabe übernimmst! Falls Du Fragen hast, schreib sie einfach ins Issue!
issueCurrentlyAssignedMessage: Die Aufgabe wird aktuell bereits von jemand anderem bearbeitet, daher kannst Du Dir diese leider nicht selbst zuweisen.
trigger: .meine-aufgabe
token: ${{ secrets.GITHUB_TOKEN }}
- id: assignee-count
run: |
count=$(gh issue view $ISSUE_ID --json assignees | jq -e '.assignees | length')
echo "count=$count" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_ID: ${{ github.event.issue.number }}
- uses: ./.github/actions/move-issue
if: steps.assignee-count.outputs.count > 0
with:
app-id: ${{ secrets.COMMUNITY_APP_ID }}
private-key: ${{ secrets.COMMUNITY_APP_PEM }}
issue-id: ${{ github.event.issue.node_id }}
column: In Progress
move-new-issues-to-triage-column:
name: Move new issues to triage column
if: github.event_name == 'issues' && github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- uses: Bhacaz/checkout-files@v2
with:
files: .github/actions
- uses: ./.github/actions/move-issue
with:
app-id: ${{ secrets.COMMUNITY_APP_ID }}
private-key: ${{ secrets.COMMUNITY_APP_PEM }}
issue-id: ${{ github.event.issue.node_id }}
column: Triage
move-issue-to-todo-column-when-triage-label-is-removed:
name: Move an issue to the Todo column when triage label is removed
if: github.event_name == 'issues' && github.event.action == 'unlabeled' && github.event.label.name == 'Triage'
runs-on: ubuntu-latest
steps:
- uses: Bhacaz/checkout-files@v2
with:
files: .github/actions
- uses: ./.github/actions/move-issue
with:
app-id: ${{ secrets.COMMUNITY_APP_ID }}
private-key: ${{ secrets.COMMUNITY_APP_PEM }}
issue-id: ${{ github.event.issue.node_id }}
column: Todo
move-issue-to-in-progress-on-assign:
name: Move an issue to in progress when it is assigned.
if: github.event_name == 'issues' && github.event.action == 'assigned'
runs-on: ubuntu-latest
steps:
- uses: Bhacaz/checkout-files@v2
with:
files: .github/actions
- uses: ./.github/actions/move-issue
with:
app-id: ${{ secrets.COMMUNITY_APP_ID }}
private-key: ${{ secrets.COMMUNITY_APP_PEM }}
issue-id: ${{ github.event.issue.node_id }}
column: In Progress
move-issue-back-to-todo-on-unassign:
name: Move an issue back to todo on unassign
if: github.event_name == 'issues' && github.event.action == 'unassigned' && !github.event.issue.assignee
runs-on: ubuntu-latest
steps:
- uses: Bhacaz/checkout-files@v2
with:
files: .github/actions
- uses: ./.github/actions/move-issue
with:
app-id: ${{ secrets.COMMUNITY_APP_ID }}
private-key: ${{ secrets.COMMUNITY_APP_PEM }}
issue-id: ${{ github.event.issue.node_id }}
column: Todo
comment-on-possible-stale-issues:
name: Comment on possible stable issues
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
include-only-assigned: true
exempt-assignees: 'ManuelRauber,M4lph'
days-before-stale: 7
days-before-close: -1 # Never close an issue/pr
stale-issue-message: 'Hey! Diese Aufgabe wurde vor einigen Tagen übernommen, aber seit dem ist nichts mehr passiert. Eventuell kann der aktuelle Contributor sich dazu äußern?'
stale-pr-message: 'Hey! Dieser Pull Request wurde vor einigen Tagen gestellt und bedarf noch Änderungen, aber seit dem ist nichts mehr passiert. Eventuell kann der aktuelle Contributor sich dazu äußern?'
stale-issue-label: 'Wartet auf Contributor'
stale-pr-label: 'Wartet auf Contributor'
exempt-issue-labels: 'Blockiert'
exempt-pr-labels: 'Blockiert'
remove-stale-when-updated: true
unassign-issues-labeled-waiting-for-contributor-after-7-days-of-inactivity:
name: Unassign issues labeled "Wartet auf Contributor" after 7 days of inactivity.
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: boundfoxstudios/action-unassign-contributor-after-days-of-inactivity@v1
with:
last-activity: 7
labels: 'Wartet auf Contributor'
exempt-assignees: 'ManuelRauber,M4lph'
labels-to-remove: 'Wartet auf Contributor'
message: 'Aufgrund längerer Inaktivität wurde diese Aufgabe automatisch zurückgeben.'