Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 5ca2a8a

Browse files
committed
Merge remote-tracking branch 'origin/master' into may-2019-audit
2 parents 3145fdf + e21a233 commit 5ca2a8a

File tree

9 files changed

+144
-82
lines changed

9 files changed

+144
-82
lines changed

config.yml

Lines changed: 83 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: If you are looking for a quick and fun introduction to the exciting
44
template:
55
name: intro-html
66
repo: intro-to-html-template
7-
description: 'A robot powered training repository :robot:'
7+
description: "A robot powered training repository :robot:"
88
before:
99
- type: createIssue
1010
title: Welcome
@@ -14,24 +14,31 @@ before:
1414
steps:
1515
- title: Turn on GitHub Pages
1616
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"
1919
actions:
20+
- type: octokit
21+
method: repos.getPages
22+
owner: "%payload.repository.owner.login%"
23+
repo: "%payload.repository.name%"
24+
action_id: pagesUrl
2025
- type: respond
2126
with: 00-openapr.md
27+
data:
28+
pagesUrl: "%actions.pagesUrl.data.html_url%"
2229
issue: 1
2330

2431
- title: Open a pull request
2532
description: Open a pull request.
2633
event: pull_request.opened
27-
link: '{{ repoUrl }}/issues/1'
34+
link: "{{ repoUrl }}/issues/1"
2835
actions:
2936
- type: gate
30-
left: '%payload.pull_request.head.ref%'
37+
left: "%payload.pull_request.head.ref%"
3138
operator: ===
3239
right: add-index
3340
- type: gate
34-
left: '%payload.pull_request.base.ref%'
41+
left: "%payload.pull_request.base.ref%"
3542
operator: ===
3643
right: master
3744
- type: closeIssue
@@ -40,31 +47,31 @@ steps:
4047
- type: respond
4148
with: 02-html-structure.md
4249
data:
43-
welcomeLink: '%actions.prev.data.html_url%'
50+
welcomeLink: "%actions.prev.data.html_url%"
4451

4552
- title: Build the HTML document structure
4653
description: Follow the instructions to write the base structure of your HTML file
4754
event: pull_request.synchronize
48-
link: '{{ repoUrl }}/pulls'
55+
link: "{{ repoUrl }}/pulls"
4956
actions:
5057
- type: getFileContents
5158
filename: index.html
5259
action_id: index_file
5360
- type: htmlContainsTag
54-
html: '%actions.index_file%'
61+
html: "%actions.index_file%"
5562
tag: html
5663
action_id: contains_html
5764
required: false
5865
- type: htmlContainsTag
59-
html: '%actions.index_file%'
66+
html: "%actions.index_file%"
6067
tag: body
6168
action_id: contains_body
6269
required: false
6370
- type: gate
6471
every: true
6572
gates:
66-
- left: '%actions.contains_html%'
67-
- left: '%actions.contains_body%'
73+
- left: "%actions.contains_html%"
74+
- left: "%actions.contains_body%"
6875
else:
6976
type: createReview
7077
body: 03e-add-html.md
@@ -76,26 +83,26 @@ steps:
7683
- title: Add a title tag
7784
description: Add a title tag
7885
event: pull_request.synchronize
79-
link: '{{ repoUrl }}/pulls'
86+
link: "{{ repoUrl }}/pulls"
8087
actions:
8188
- type: getFileContents
8289
filename: index.html
8390
action_id: index_file
8491
- type: htmlContainsTag
85-
html: '%actions.index_file%'
92+
html: "%actions.index_file%"
8693
tag: head
8794
action_id: contains_head
8895
required: false
8996
- type: htmlContainsTag
90-
html: '%actions.index_file%'
97+
html: "%actions.index_file%"
9198
tag: title
9299
action_id: contains_title
93100
required: false
94101
- type: gate
95102
every: true
96103
gates:
97-
- left: '%actions.contains_title%'
98-
- left: '%actions.contains_head%'
104+
- left: "%actions.contains_title%"
105+
- left: "%actions.contains_head%"
99106
else:
100107
type: createReview
101108
event: REQUEST_CHANGES
@@ -107,39 +114,46 @@ steps:
107114
- title: Merge your first pull request
108115
description: Merge your pull request
109116
event: pull_request.closed
110-
link: '{{ repoUrl }}/pulls'
117+
link: "{{ repoUrl }}/pulls"
111118
actions:
112119
- 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
114126
- type: createIssue
115127
title: Add a header
116128
body: 05-h1-tag.md
129+
data:
130+
pagesUrl: "%actions.pagesUrl.data.html_url%"
117131
action_id: new_issue
118132
- type: respond
119133
with: next.md
120134
data:
121-
issueURL: '%actions.new_issue.data.html_url%'
135+
issueURL: "%actions.new_issue.data.html_url%"
122136

123137
- title: Change your username to an h1 tag
124138
description: Change your username to an h1 tag
125139
event: pull_request
126-
link: '{{ repoUrl }}/pulls'
140+
link: "{{ repoUrl }}/pulls"
127141
actions:
128142
- type: gate
129143
gates:
130-
- left: '%payload.action%'
144+
- left: "%payload.action%"
131145
operator: ===
132146
right: opened
133-
- left: '%payload.action%'
147+
- left: "%payload.action%"
134148
operator: ===
135149
right: synchronize
136150
- type: gate
137-
left: '%payload.pull_request.base.ref%'
151+
left: "%payload.pull_request.base.ref%"
138152
operator: ===
139153
right: master
140154
- type: gate
141-
left: '%payload.action%'
142-
operator: '!=='
155+
left: "%payload.action%"
156+
operator: "!=="
143157
right: opened
144158
required: false
145159
else:
@@ -149,12 +163,12 @@ steps:
149163
filename: index.html
150164
action_id: index_file
151165
- type: htmlContainsTag
152-
html: '%actions.index_file%'
166+
html: "%actions.index_file%"
153167
tag: h1
154168
action_id: contains_h1
155169
required: false
156170
- type: gate
157-
left: '%actions.contains_h1%'
171+
left: "%actions.contains_h1%"
158172
else:
159173
type: createReview
160174
event: REQUEST_CHANGES
@@ -166,18 +180,18 @@ steps:
166180
- title: Add an image
167181
description: Add an image
168182
event: pull_request.synchronize
169-
link: '{{ repoUrl }}/pulls'
183+
link: "{{ repoUrl }}/pulls"
170184
actions:
171185
- type: getFileContents
172186
filename: index.html
173187
action_id: index_file
174188
- type: htmlContainsTag
175-
html: '%actions.index_file%'
189+
html: "%actions.index_file%"
176190
tag: img
177191
attribute: src
178192
action_id: contains_img
179193
- type: gate
180-
left: '%actions.contains_img%'
194+
left: "%actions.contains_img%"
181195
else:
182196
type: createReview
183197
body: 06e-image.md
@@ -189,39 +203,46 @@ steps:
189203
- title: Merge your second pull request
190204
description: Merge your pull request
191205
event: pull_request.closed
192-
link: '{{ repoUrl }}/pulls'
206+
link: "{{ repoUrl }}/pulls"
193207
actions:
194208
- 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
196215
- type: createIssue
197216
action_id: new_issue
198217
title: Create a list
199218
body: 08-create-list.md
219+
data:
220+
pagesUrl: "%actions.pagesUrl.data.html_url%"
200221
- type: respond
201222
with: next.md
202223
data:
203-
issueURL: '%actions.new_issue.data.html_url%'
224+
issueURL: "%actions.new_issue.data.html_url%"
204225

205226
- title: Create a list
206227
description: Create a list
207228
event: pull_request
208-
link: '{{ repoUrl }}/pulls'
229+
link: "{{ repoUrl }}/pulls"
209230
actions:
210231
- type: gate
211232
gates:
212-
- left: '%payload.action%'
233+
- left: "%payload.action%"
213234
operator: ===
214235
right: opened
215-
- left: '%payload.action%'
236+
- left: "%payload.action%"
216237
operator: ===
217238
right: synchronize
218239
- type: gate
219-
left: '%payload.pull_request.base.ref%'
240+
left: "%payload.pull_request.base.ref%"
220241
operator: ===
221242
right: master
222243
- type: gate
223-
left: '%payload.action%'
224-
operator: '!=='
244+
left: "%payload.action%"
245+
operator: "!=="
225246
right: opened
226247
required: false
227248
else:
@@ -231,19 +252,19 @@ steps:
231252
filename: index.html
232253
action_id: index_file
233254
- type: htmlContainsTag
234-
html: '%actions.index_file%'
255+
html: "%actions.index_file%"
235256
tag: ul
236257
action_id: contains_ul
237258
required: false
238259
- type: htmlContainsTag
239-
html: '%actions.index_file%'
260+
html: "%actions.index_file%"
240261
tag: ol
241262
action_id: contains_ol
242263
required: false
243264
- type: gate
244265
gates:
245-
- left: '%actions.contains_ul%'
246-
- left: '%actions.contains_ol%'
266+
- left: "%actions.contains_ul%"
267+
- left: "%actions.contains_ol%"
247268
else:
248269
type: createReview
249270
body: 08e-list.md
@@ -255,18 +276,18 @@ steps:
255276
- title: Add links
256277
description: Add links
257278
event: pull_request.synchronize
258-
link: '{{ repoUrl }}/pulls'
279+
link: "{{ repoUrl }}/pulls"
259280
actions:
260281
- type: getFileContents
261282
filename: index.html
262283
action_id: index_file
263284
- type: htmlContainsTag
264-
html: '%actions.index_file%'
285+
html: "%actions.index_file%"
265286
tag: a
266287
action_id: contains_a
267288
required: false
268289
- type: gate
269-
left: '%actions.contains_a%'
290+
left: "%actions.contains_a%"
270291
else:
271292
type: createReview
272293
body: 09e-links.md
@@ -278,10 +299,10 @@ steps:
278299
- title: Merge your third pull request
279300
description: Merge your pull request
280301
event: pull_request.closed
281-
link: '{{ repoUrl }}/pulls'
302+
link: "{{ repoUrl }}/pulls"
282303
actions:
283304
- type: gate
284-
left: '%payload.pull_request.merged%'
305+
left: "%payload.pull_request.merged%"
285306
- type: mergeBranch
286307
head: master
287308
base: add-style
@@ -293,20 +314,20 @@ steps:
293314
- type: respond
294315
with: next.md
295316
data:
296-
issueURL: '%actions.new_pr.data.html_url%'
317+
issueURL: "%actions.new_pr.data.html_url%"
297318

298319
- title: Make it beautiful
299320
description: Add some styles to your new site
300321
event: pull_request.synchronize
301-
link: '{{ repoUrl }}/pulls'
322+
link: "{{ repoUrl }}/pulls"
302323
actions:
303324
- type: getFileContents
304325
filename: index.html
305326
action_id: index
306327
- type: gate
307328
left: '/<link rel="stylesheet" href="style.css">/'
308329
operator: test
309-
right: '%actions.index%'
330+
right: "%actions.index%"
310331
else:
311332
type: respond
312333
with: 11-style-fail.md
@@ -317,12 +338,19 @@ steps:
317338
- title: Merge the final pull request
318339
description: Get ready to show off your new skills
319340
event: pull_request.closed
320-
link: '{{ repoUrl }}/pulls'
341+
link: "{{ repoUrl }}/pulls"
321342
actions:
322343
- 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
324350
- type: respond
325351
with: 12-big-finish.md
352+
data:
353+
pagesUrl: "%actions.pagesUrl.data.html_url%"
326354

327-
tags:
355+
tags:
328356
- GitHub Pages

responses/00-openapr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
## Step 2: Open a pull request
22

3-
GitHub Pages is now serving your web page at: https://{{user.username}}.github.io/{{repo}}/
3+
GitHub Pages is now serving your web page at: {{ pagesUrl }}
44

55
It's not very special looking yet, is it? Web hosts (and GitHub Pages) look for a file titled `index.html` and serve that up. Since there's no `index.html` file in our repository, GitHub Pages displays the contents of the README by default. Let's change this by adding the `index.html` file to our repository.
66

77
### :keyboard: Activity: Add `index.html`
88

99
To help you get started, I have already created an `index.html` file for you on a branch called: `add-index`. All you need to do is create the pull request:
1010

11-
1. Create a pull request. You can either [use this direct link](https://github.com/{{ user.username }}/{{ repo }}/compare/master...add-index?expand=1), or go to the **Code** tab, click on **New Pull Request**, select **base: master**, and **compare: add-index**.
12-
1. Add a descriptive title to your pull request, something like "Add the index.html file".
13-
1. Add a descriptive body to your pull request.
14-
1. Click **Create pull request**.
11+
1. Create a pull request. You can either [use this direct link]({{ repoUrl }}/compare/master...add-index?expand=1), or go to the **Code** tab, click on **New Pull Request**, select **base: master**, and **compare: add-index**.
12+
2. Add a descriptive title to your pull request, something like "Add the index.html file".
13+
3. Add a descriptive body to your pull request.
14+
4. Click **Create pull request**.
1515

1616
<hr>
1717
<h3 align="center">I'll respond in your new pull request.</h3>

0 commit comments

Comments
 (0)