@@ -4,7 +4,7 @@ description: If you are looking for a quick and fun introduction to the exciting
4
4
template :
5
5
name : intro-html
6
6
repo : intro-to-html-template
7
- description : ' A robot powered training repository :robot:'
7
+ description : " A robot powered training repository :robot:"
8
8
before :
9
9
- type : createIssue
10
10
title : Welcome
@@ -14,24 +14,31 @@ before:
14
14
steps :
15
15
- title : Turn on GitHub Pages
16
16
description : Turn on GitHub Pages in the settings page of the repository.
17
- event : deployment
18
- link : ' {{ repoUrl }}/issues/1'
17
+ event : page_build
18
+ link : " {{ repoUrl }}/issues/1"
19
19
actions :
20
+ - type : octokit
21
+ method : repos.getPages
22
+ owner : " %payload.repository.owner.login%"
23
+ repo : " %payload.repository.name%"
24
+ action_id : pagesUrl
20
25
- type : respond
21
26
with : 00-openapr.md
27
+ data :
28
+ pagesUrl : " %actions.pagesUrl.data.html_url%"
22
29
issue : 1
23
30
24
31
- title : Open a pull request
25
32
description : Open a pull request.
26
33
event : pull_request.opened
27
- link : ' {{ repoUrl }}/issues/1'
34
+ link : " {{ repoUrl }}/issues/1"
28
35
actions :
29
36
- type : gate
30
- left : ' %payload.pull_request.head.ref%'
37
+ left : " %payload.pull_request.head.ref%"
31
38
operator : ===
32
39
right : add-index
33
40
- type : gate
34
- left : ' %payload.pull_request.base.ref%'
41
+ left : " %payload.pull_request.base.ref%"
35
42
operator : ===
36
43
right : master
37
44
- type : closeIssue
@@ -40,31 +47,31 @@ steps:
40
47
- type : respond
41
48
with : 02-html-structure.md
42
49
data :
43
- welcomeLink : ' %actions.prev.data.html_url%'
50
+ welcomeLink : " %actions.prev.data.html_url%"
44
51
45
52
- title : Build the HTML document structure
46
53
description : Follow the instructions to write the base structure of your HTML file
47
54
event : pull_request.synchronize
48
- link : ' {{ repoUrl }}/pulls'
55
+ link : " {{ repoUrl }}/pulls"
49
56
actions :
50
57
- type : getFileContents
51
58
filename : index.html
52
59
action_id : index_file
53
60
- type : htmlContainsTag
54
- html : ' %actions.index_file%'
61
+ html : " %actions.index_file%"
55
62
tag : html
56
63
action_id : contains_html
57
64
required : false
58
65
- type : htmlContainsTag
59
- html : ' %actions.index_file%'
66
+ html : " %actions.index_file%"
60
67
tag : body
61
68
action_id : contains_body
62
69
required : false
63
70
- type : gate
64
71
every : true
65
72
gates :
66
- - left : ' %actions.contains_html%'
67
- - left : ' %actions.contains_body%'
73
+ - left : " %actions.contains_html%"
74
+ - left : " %actions.contains_body%"
68
75
else :
69
76
type : createReview
70
77
body : 03e-add-html.md
@@ -76,26 +83,26 @@ steps:
76
83
- title : Add a title tag
77
84
description : Add a title tag
78
85
event : pull_request.synchronize
79
- link : ' {{ repoUrl }}/pulls'
86
+ link : " {{ repoUrl }}/pulls"
80
87
actions :
81
88
- type : getFileContents
82
89
filename : index.html
83
90
action_id : index_file
84
91
- type : htmlContainsTag
85
- html : ' %actions.index_file%'
92
+ html : " %actions.index_file%"
86
93
tag : head
87
94
action_id : contains_head
88
95
required : false
89
96
- type : htmlContainsTag
90
- html : ' %actions.index_file%'
97
+ html : " %actions.index_file%"
91
98
tag : title
92
99
action_id : contains_title
93
100
required : false
94
101
- type : gate
95
102
every : true
96
103
gates :
97
- - left : ' %actions.contains_title%'
98
- - left : ' %actions.contains_head%'
104
+ - left : " %actions.contains_title%"
105
+ - left : " %actions.contains_head%"
99
106
else :
100
107
type : createReview
101
108
event : REQUEST_CHANGES
@@ -107,39 +114,46 @@ steps:
107
114
- title : Merge your first pull request
108
115
description : Merge your pull request
109
116
event : pull_request.closed
110
- link : ' {{ repoUrl }}/pulls'
117
+ link : " {{ repoUrl }}/pulls"
111
118
actions :
112
119
- type : gate
113
- left : ' %payload.pull_request.merged%'
120
+ left : " %payload.pull_request.merged%"
121
+ - type : octokit
122
+ method : repos.getPages
123
+ owner : " %payload.repository.owner.login%"
124
+ repo : " %payload.repository.name%"
125
+ action_id : pagesUrl
114
126
- type : createIssue
115
127
title : Add a header
116
128
body : 05-h1-tag.md
129
+ data :
130
+ pagesUrl : " %actions.pagesUrl.data.html_url%"
117
131
action_id : new_issue
118
132
- type : respond
119
133
with : next.md
120
134
data :
121
- issueURL : ' %actions.new_issue.data.html_url%'
135
+ issueURL : " %actions.new_issue.data.html_url%"
122
136
123
137
- title : Change your username to an h1 tag
124
138
description : Change your username to an h1 tag
125
139
event : pull_request
126
- link : ' {{ repoUrl }}/pulls'
140
+ link : " {{ repoUrl }}/pulls"
127
141
actions :
128
142
- type : gate
129
143
gates :
130
- - left : ' %payload.action%'
144
+ - left : " %payload.action%"
131
145
operator : ===
132
146
right : opened
133
- - left : ' %payload.action%'
147
+ - left : " %payload.action%"
134
148
operator : ===
135
149
right : synchronize
136
150
- type : gate
137
- left : ' %payload.pull_request.base.ref%'
151
+ left : " %payload.pull_request.base.ref%"
138
152
operator : ===
139
153
right : master
140
154
- type : gate
141
- left : ' %payload.action%'
142
- operator : ' !=='
155
+ left : " %payload.action%"
156
+ operator : " !=="
143
157
right : opened
144
158
required : false
145
159
else :
@@ -149,12 +163,12 @@ steps:
149
163
filename : index.html
150
164
action_id : index_file
151
165
- type : htmlContainsTag
152
- html : ' %actions.index_file%'
166
+ html : " %actions.index_file%"
153
167
tag : h1
154
168
action_id : contains_h1
155
169
required : false
156
170
- type : gate
157
- left : ' %actions.contains_h1%'
171
+ left : " %actions.contains_h1%"
158
172
else :
159
173
type : createReview
160
174
event : REQUEST_CHANGES
@@ -166,18 +180,18 @@ steps:
166
180
- title : Add an image
167
181
description : Add an image
168
182
event : pull_request.synchronize
169
- link : ' {{ repoUrl }}/pulls'
183
+ link : " {{ repoUrl }}/pulls"
170
184
actions :
171
185
- type : getFileContents
172
186
filename : index.html
173
187
action_id : index_file
174
188
- type : htmlContainsTag
175
- html : ' %actions.index_file%'
189
+ html : " %actions.index_file%"
176
190
tag : img
177
191
attribute : src
178
192
action_id : contains_img
179
193
- type : gate
180
- left : ' %actions.contains_img%'
194
+ left : " %actions.contains_img%"
181
195
else :
182
196
type : createReview
183
197
body : 06e-image.md
@@ -189,39 +203,46 @@ steps:
189
203
- title : Merge your second pull request
190
204
description : Merge your pull request
191
205
event : pull_request.closed
192
- link : ' {{ repoUrl }}/pulls'
206
+ link : " {{ repoUrl }}/pulls"
193
207
actions :
194
208
- type : gate
195
- left : ' %payload.pull_request.merged%'
209
+ left : " %payload.pull_request.merged%"
210
+ - type : octokit
211
+ method : repos.getPages
212
+ owner : " %payload.repository.owner.login%"
213
+ repo : " %payload.repository.name%"
214
+ action_id : pagesUrl
196
215
- type : createIssue
197
216
action_id : new_issue
198
217
title : Create a list
199
218
body : 08-create-list.md
219
+ data :
220
+ pagesUrl : " %actions.pagesUrl.data.html_url%"
200
221
- type : respond
201
222
with : next.md
202
223
data :
203
- issueURL : ' %actions.new_issue.data.html_url%'
224
+ issueURL : " %actions.new_issue.data.html_url%"
204
225
205
226
- title : Create a list
206
227
description : Create a list
207
228
event : pull_request
208
- link : ' {{ repoUrl }}/pulls'
229
+ link : " {{ repoUrl }}/pulls"
209
230
actions :
210
231
- type : gate
211
232
gates :
212
- - left : ' %payload.action%'
233
+ - left : " %payload.action%"
213
234
operator : ===
214
235
right : opened
215
- - left : ' %payload.action%'
236
+ - left : " %payload.action%"
216
237
operator : ===
217
238
right : synchronize
218
239
- type : gate
219
- left : ' %payload.pull_request.base.ref%'
240
+ left : " %payload.pull_request.base.ref%"
220
241
operator : ===
221
242
right : master
222
243
- type : gate
223
- left : ' %payload.action%'
224
- operator : ' !=='
244
+ left : " %payload.action%"
245
+ operator : " !=="
225
246
right : opened
226
247
required : false
227
248
else :
@@ -231,19 +252,19 @@ steps:
231
252
filename : index.html
232
253
action_id : index_file
233
254
- type : htmlContainsTag
234
- html : ' %actions.index_file%'
255
+ html : " %actions.index_file%"
235
256
tag : ul
236
257
action_id : contains_ul
237
258
required : false
238
259
- type : htmlContainsTag
239
- html : ' %actions.index_file%'
260
+ html : " %actions.index_file%"
240
261
tag : ol
241
262
action_id : contains_ol
242
263
required : false
243
264
- type : gate
244
265
gates :
245
- - left : ' %actions.contains_ul%'
246
- - left : ' %actions.contains_ol%'
266
+ - left : " %actions.contains_ul%"
267
+ - left : " %actions.contains_ol%"
247
268
else :
248
269
type : createReview
249
270
body : 08e-list.md
@@ -255,18 +276,18 @@ steps:
255
276
- title : Add links
256
277
description : Add links
257
278
event : pull_request.synchronize
258
- link : ' {{ repoUrl }}/pulls'
279
+ link : " {{ repoUrl }}/pulls"
259
280
actions :
260
281
- type : getFileContents
261
282
filename : index.html
262
283
action_id : index_file
263
284
- type : htmlContainsTag
264
- html : ' %actions.index_file%'
285
+ html : " %actions.index_file%"
265
286
tag : a
266
287
action_id : contains_a
267
288
required : false
268
289
- type : gate
269
- left : ' %actions.contains_a%'
290
+ left : " %actions.contains_a%"
270
291
else :
271
292
type : createReview
272
293
body : 09e-links.md
@@ -278,10 +299,10 @@ steps:
278
299
- title : Merge your third pull request
279
300
description : Merge your pull request
280
301
event : pull_request.closed
281
- link : ' {{ repoUrl }}/pulls'
302
+ link : " {{ repoUrl }}/pulls"
282
303
actions :
283
304
- type : gate
284
- left : ' %payload.pull_request.merged%'
305
+ left : " %payload.pull_request.merged%"
285
306
- type : mergeBranch
286
307
head : master
287
308
base : add-style
@@ -293,20 +314,20 @@ steps:
293
314
- type : respond
294
315
with : next.md
295
316
data :
296
- issueURL : ' %actions.new_pr.data.html_url%'
317
+ issueURL : " %actions.new_pr.data.html_url%"
297
318
298
319
- title : Make it beautiful
299
320
description : Add some styles to your new site
300
321
event : pull_request.synchronize
301
- link : ' {{ repoUrl }}/pulls'
322
+ link : " {{ repoUrl }}/pulls"
302
323
actions :
303
324
- type : getFileContents
304
325
filename : index.html
305
326
action_id : index
306
327
- type : gate
307
328
left : ' /<link rel="stylesheet" href="style.css">/'
308
329
operator : test
309
- right : ' %actions.index%'
330
+ right : " %actions.index%"
310
331
else :
311
332
type : respond
312
333
with : 11-style-fail.md
@@ -317,12 +338,19 @@ steps:
317
338
- title : Merge the final pull request
318
339
description : Get ready to show off your new skills
319
340
event : pull_request.closed
320
- link : ' {{ repoUrl }}/pulls'
341
+ link : " {{ repoUrl }}/pulls"
321
342
actions :
322
343
- type : gate
323
- left : ' %payload.pull_request.merged%'
344
+ left : " %payload.pull_request.merged%"
345
+ - type : octokit
346
+ method : repos.getPages
347
+ owner : " %payload.repository.owner.login%"
348
+ repo : " %payload.repository.name%"
349
+ action_id : pagesUrl
324
350
- type : respond
325
351
with : 12-big-finish.md
352
+ data :
353
+ pagesUrl : " %actions.pagesUrl.data.html_url%"
326
354
327
- tags :
355
+ tags :
328
356
- GitHub Pages
0 commit comments