This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfig.yml
336 lines (323 loc) · 10.5 KB
/
config.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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
title: Introduction to React
description: In this course, you will learn the basics of React.js through building a gradebook web application to manage assignments, students, and grades.
template:
name: intro-react
repo: react-template
description: 'A robot powered training repository :robot:'
before:
- type: createIssue
title: Welcome to React
body: 00_setup.md
comments:
- 00_open-pr.md
- type: updateBranchProtection
steps:
# Step 1: User opens a pull request after cloning and validating Node is installed
- title: Open a pull request
description: Welcome to React! Let's get started with our project.
event: pull_request.opened
link: '{{ repoUrl }}/issues/1'
video: https://www.youtube.com/embed/RlDJqryBkkI
actions:
- type: closeIssue
issue: Welcome to React
- type: respond
with: 01_components.md
issue: 2
- type: createPullRequestComment
body: 01_header-component-activity.md
file: src/App.jsx
position: 85
# Step 2: User adds a header component
- title: Add a header component
description: Give your app a title by adding a header component
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/aBZ6vaPpNS4
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*<\s*h3\s*className\s*=\s*"\s*Box-title\s*d-flex\s*flex-justify-center\s*"\s*>\s*GradeBook\s*<\s*\/\s*h3\s*>/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 02_bad-header.md
issue: 2
- type: respond
with: 02_props.md
issue: 2
- type: createPullRequestComment
body: 02_import-child-component-activity.md
file: src/App.jsx
position: 3
pullRequest: '%actions.metaPR2.data.number%'
# Step 3: User makes changes to import a child component
- title: Import a child component
description: Import a child component into its parent
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/NXnI05i5TI8
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*import\s*List\s*from\s*"\s*\.\/List\s*"\s*;\s*/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 03_bad-import.md
issue: 2
- type: createPullRequestComment
body: 03_uncomment-assignments-activity.md
file: src/App.jsx
position: 46
pullRequest: '%actions.metaPR2.data.number%'
# Step 4: Add an assignments section by uncommenting
- title: Uncomment assignments section
description: Add the ability to create assignments
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/SrpOpss4Luw
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*if\s*\(\s*this.state.buttonClicked\s*===\s*"assignments"\)\s*{\s*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*}\s*\n/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 04_bad-uncomment.md
issue: 2
- type: createPullRequestComment
body: 04_replace-title-activity.md
file: src/List.jsx
position: 5
pullRequest: '%actions.metaPR2.data.number%'
# Step 5: Replace the title prop
- title: Replace the title prop
description: Pass a title prop to the List child component
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/3wZV8nQoJQA
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/List.jsx'
- type: gate
left: '/h2">\s*{\s*this\.props\.title\s*}\s*<\s*/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 05_bad-prop.md
issue: 2
- type: respond
with: 05_state.md
issue: 2
- type: createPullRequestComment
body: 05_add-state-variable-activity.md
file: src/App.jsx
position: 12
pullRequest: '%actions.metaPR2.data.number%'
# Step 6: add a state variable
- title: Add a state variable
description: Add a students state variable to keep track of students
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/l3nf0C2Xil4
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/\s*students\s*:\s*\[\s*\]\s*,\s*/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 06_bad-state.md
issue: 2
- type: createPullRequestComment
body: 06_explaining-this-state-activity.md
file: src/App.jsx
position: 32
pullRequest: '%actions.metaPR2.data.number%'
- type: createPullRequestComment
body: 06_create-addstudent-activity.md
file: src/App.jsx
position: 38
pullRequest: '%actions.metaPR2.data.number%'
# Step 7: Create a method
- title: Create a method
description: Create a method to add students to our state
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/Rt9E3beRrOc
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*addStudent\s*\(\s*studentName\s*\)\s*/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 07_bad-function.md
issue: 2
- type: createPullRequestComment
body: 07_bind-function-activity.md
file: src/App.jsx
position: 20
pullRequest: '%actions.metaPR2.data.number%'
# Step 8: Bind a method
- title: Bind a method
description: Bind the addStudents method to our class
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/sJJXnhLuo04
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*this\.addStudent\s*=\s*this\.addStudent\.bind\s*\(\s*this\s*\)\s*;\s*\n/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 04_bad-uncomment.md
issue: 2
- type: respond
with: 08_callbackfunctions.md
issue: 2
- type: createPullRequestComment
body: 08_passing-functions-activity.md
file: src/App.jsx
position: 52
pullRequest: '%actions.metaPR2.data.number%'
- type: createPullRequestComment
body: 08_change-props-students-activity.md
file: src/App.jsx
position: 68
pullRequest: '%actions.metaPR2.data.number%'
# Step 9: Pass functions as props
- title: Pass functions as props
description: Learn how to pass data back to parent components
event: push
link: '{{ repoUrl }}/issues/2'
video: https://www.youtube.com/embed/Rass5Io27r0
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getPullRequest
pullRequest: 2
action_id: metaPR2
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/\s*placeholder\s*=\s*"Add\sStudent\.\.\."\s*\n\s*currList\s*=\s*{\s*this\.state\.students\s*}\n\s*addFunction\s*=\s*{\s*this\.addStudent\s*}\s*\n/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 09_bad-replace.md
issue: 2
- type: createPullRequestComment
body: 09_uncomment-grades-activity.md
file: src/App.jsx
position: 78
pullRequest: '%actions.metaPR2.data.number%'
# Step 10: Get approval
- title: Get your pull request approved
event: push
description: Let's confirm you made the right changes
video: https://www.youtube.com/embed/J6M-oi9-LVI
actions:
- type: gate
left: '%payload.ref%'
operator: ===
right: refs/heads/changes
- type: getFileContents
action_id: fileContents
filename: 'src/App.jsx'
- type: gate
left: '/^\s*if\s*\(\s*this.state.buttonClicked\s*===\s*"grades"\)\s*{\s*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*}\s*\n/gm'
operator: test
right: '%actions.fileContents%'
else:
- type: respond
with: 04_bad-uncomment.md
issue: 2
- type: createReview
event: APPROVE
body: 10_approve.md
pullRequest: 2
# Step 11: Merge pull request
- title: Merge your pull request
event: pull_request.closed
description: Congrats on finishing the course!
video: https://www.youtube.com/embed/uJGGBhdivYQ
actions:
- type: respond
with: 11_congrats.md
issue: 2