This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (130 loc) · 5.07 KB
/
umino-project.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
name: UMINO Project
on:
issues:
types:
- opened
- reopened
- closed
- assigned
- unassigned
- labeled
- unlabeled
- edited
pull_request:
types:
- opened
- reopened
- review_requested
- closed
- assigned
- unassigned
- labeled
- unlabeled
- edited
issue_comment:
types:
- created
env:
backlog: To do in this week
inbox: Inbox
in_progress: In Progress
in_waiting: In Waiting
gh_project_token: ${{ secrets.GH_TOKEN }}
user: HiromiShikata
project_id: 48
jobs:
opened_or_reopened:
name: opened_or_reopened
runs-on: ubuntu-latest
if: github.event.action == 'opened' || github.event.action == 'reopened'
steps:
- name: Move issue to ${{ env.inbox }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.inbox }}
assigned_or_unassigned:
name: assigned_or_unassigned
runs-on: ubuntu-latest
if: github.event.action == 'assigned' || github.event.action == 'unassigned'
steps:
- name: Move issue to ${{ env.inbox }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.inbox }}
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: working right now
labeled_working:
runs-on: ubuntu-latest
if: github.event.action == 'labeled' && github.event.label.name == 'working right now'
steps:
- name: Move issue to ${{ env.in_progress }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.in_progress }}
unlabeled_working:
runs-on: ubuntu-latest
if: github.event.action == 'unlabeled' && github.event.label.name == 'working right now'
steps:
- name: Move issue to ${{ env.inbox }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.inbox }}
labeled_will_close:
runs-on: ubuntu-latest
if: github.event.action == 'labeled' && github.event.label.name == 'will close automatically by PR'
steps:
- name: Move issue to ${{ env.in_waiting }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.in_waiting }}
edited_title_for_waiting:
runs-on: ubuntu-latest
if: github.event.action == 'edited' && (startsWith(github.event.issue.title, 'Waiting for ') || startsWith(github.event.pull_request.title, 'Waiting for '))
steps:
- name: Move issue to ${{ env.in_waiting }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_project_token }}
user: ${{ env.user }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: ${{ env.in_waiting }}
comment-command:
runs-on: ubuntu-latest
steps:
- if: |
github.event.action == 'created'
&& startsWith(github.event.comment.body, '#take')
run: |
curl -H "Authorization: token ${{ secrets.GH_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
- if: |
github.event.action == 'created'
&& startsWith(github.event.comment.body, '#close')
run: |
curl -H "Authorization: token ${{ secrets.GH_TOKEN }}" -X PATCH -d '{"state": "closed"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}
- if: |
github.event.action == 'created'
&& startsWith(github.event.comment.body, '#offline')
run: |
curl -H "Authorization: token ${{ secrets.GH_TOKEN }}" -X PATCH -d '{"labels": ["hiromishikata:task:offline"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}