This repository was archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.yml
More file actions
174 lines (167 loc) · 5.18 KB
/
config.yml
File metadata and controls
174 lines (167 loc) · 5.18 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
title: Reviewing pull requests
description: See how collaboration works on GitHub and start building great things, together.
tags:
- GitHub
template:
name: reviewing-a-pull-request
repo: reviewing-a-pull-request-template
before:
- type: updateBranchProtection
- type: createIssue
title: Welcome
body: 01_intro.md
steps:
- title: Assign Yourself
description: Assign yourself to the first issue in this repository.
event: issues.assigned
link: "{{ repoUrl }}/issues/1"
actions:
- type: gate
left: "%payload.assignee.login%"
operator: ===
right: "%user.username%"
- type: createPullRequest
title: Update Game Instructions
body: 02_review-101.md
head: game-instructions
action_id: pr2
- type: requestReviewFromRegistrant
pullRequest: "%actions.pr2.data.number%"
- type: respond
with: 02_close-first-issue.md
data:
url: "%actions.pr2.data.html_url%"
- type: closeIssue
issue: Welcome
- title: Comment on a pull request
description: Comment on the pull request opened in your repository.
event: pull_request_review.submitted
link: "{{ repoUrl }}/pull/2"
actions:
- type: gate
every: true
gates:
- left: "%payload.review.state%"
operator: ===
right: "commented"
- left: "%payload.pull_request.title%"
operator: ===
right: Update Game Instructions
else:
- type: respond
with: error.md
- type: respond
with: 03_successful-comment.md
- title: Approve a pull request
description: Approve the pull request so that it can be merged.
event: pull_request_review.submitted
link: "{{ repoUrl }}/pull/2"
actions:
- type: gate
left: "%payload.review.state%"
operator: ===
right: "approved"
- type: mergeBranch
head: game-instructions
- type: deleteBranch
branch: game-instructions
- type: createPullRequest
title: Change Tetris Colors
body: 04_requesting-changes.md
head: update-colors
action_id: pr3
- type: respond
with: 04_merging-pull-request.md
data:
url: "%actions.pr3.data.html_url%"
- title: Requesting changes
description: Leave a review that is requesting changes.
event: pull_request_review.submitted
link: "{{ repoUrl }}/pull/3"
actions:
- type: gate
left: "%payload.review.state%"
operator: ===
right: "changes_requested"
else:
- type: gate
left: "%payload.review.state%"
operator: ===
right: commented
else:
- type: gate
left: "%payload.review.state%"
operator: ===
right: approved
- type: respond
with: 05_approval.md
- type: respond
with: 05_general-comment.md
- type: mergeBranch
head: add-multiple-colors
base: update-colors
- type: deleteBranch
branch: add-multiple-colors
- type: respond
with: 05_changes-requested.md
- title: Practice reviews
description: Approve the pull request that has been changed.
event: pull_request_review.submitted
link: "{{ repoUrl }}/pull/3"
actions:
- type: gate
left: "%payload.review.state%"
operator: ===
right: "approved"
- type: mergePullRequest
- type: deleteBranch
branch: update-colors
- type: respond
with: 08-suggest.md
data:
url: "%payload.repository.html_url%/compare/update-readme?expand=1"
- title: Open a pull request from readme-update
description: Create a pull request to learn about suggesting changes.
event: pull_request
link: "{{ repoUrl }}/compare/readme-update?expand=1"
actions:
- type: gate
gates:
- left: "%payload.action%"
operator: "==="
right: "opened"
- left: "%payload.action%"
operator: "==="
right: "edited"
- type: gate
left: "%payload.pull_request.body%"
else:
type: respond
with: fix-body.md
- type: createPullRequestComment
file: README.md
body: 08-suggest-pr.md
position: 5
data:
# !! We don't ask the learner to turn on pages, so this is just a guess and won't translate to GHES
pagesUrl: https://%user.username%.github.io/github-games/
- title: Apply the suggestion
description: Implement a change from a suggested change.
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: createReview
event: APPROVE
body: 08-suggest-merge.md
- title: Merge the pull request
description: Merge the pull request after applying the suggested change.
event: pull_request.closed
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
left: "%payload.pull_request.merged%"
else:
- type: respond
with: 08_accidental-close.md
- type: respond
with: 08_final-issue.md