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 23
/
config.yml
272 lines (263 loc) · 8.17 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
title: "Communicating using Markdown"
description: "This course will walk you through everything you need to start organizing ideas and collaborating using Markdown, a lightweight language for text formatting."
template:
name: "markdown-portfolio"
repo: "communicating-using-md-template"
preferences:
- type: radio
name: gitTool
label: Preferred Git tool
description: You can follow this course's instructions using whichever Git tool you prefer.
options:
- label: GitHub.com
value: dotcom
- label: Command line
value: cli
- type: dropdown
name: language
label: Language
description: Choose your preferred language.
options:
- label: English
value: en
- label: Español
value: es
tags: [
"GitHub","Markdown"
]
before:
- type: updateBranchProtection
branch: main
enforce_admins: true
required_pull_request_reviews:
include_admins: true
- type: createIssue
title: Getting Started with GitHub
body: "00_welcome.md"
comments:
- "00_create-tasklist.md"
steps:
#1 - Create a task list
- title: "Create a task list"
description: "Learn about task lists in your first issue."
event: "issue_comment.created"
link: '{{ repoUrl }}/issues/1'
actions:
- type: gate
left: '(-|\*)\s+\[[x|X|\s]\]\s+.+'
operator: test
right: '%payload.comment.body%'
else:
- type: gate
left: '(-|\*)\s+\[[x|X|\s]+\]\s+.+'
operator: test
right: '%payload.comment.body%'
else:
- type: respond
with: '01_tasklist.md'
- type: respond
with: '01_taskwhitespaces.md'
- type: respond
with: '01_turn-on-ghp.md'
#2 - Turn on GitHub Pages
- title: "Turn on GitHub Pages"
description: "Create serve your repository contents on a web page using GitHub Pages."
event: page_build
link: '{{ repoUrl }}/settings'
actions:
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: createPullRequest
action_id: pr
title: Give your portfolio a header
body: '02_headers.md'
head: add-headers
data:
thePayload: '%payload%'
- type: closeIssue
issue: Getting Started with GitHub
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
issue: Getting Started with GitHub
with: '02_close-issue.md'
data:
url: '%actions.pagesUrl.data.html_url%'
prUrl: '%actions.pr.data.html_url%'
#3 - Add headers
- title: "Add headers"
description: "Add headers to some unformatted content."
event: "pull_request.synchronize"
link: '{{ repoUrl }}/pull/2'
actions:
- type: getFileContents
action_id: fileContents
filename: '_includes/01-name.md'
- type: gate
left: '/^#{1,6}\s.+/gm'
operator: test
right: '%actions.fileContents%'
else:
type: respond
with: 03_request-changes.md
- type: removeBranchProtection
- type: respond
with: 03_pr-succeeds.md
#4 - Merge your headers
- title: "Merge your headers"
description: "Merge your first PR to see headers in action."
event: "pull_request.closed"
link: '{{ repoUrl }}/pull/2'
actions:
- type: gate
left: '%payload.pull_request.merged%'
- type: updateBranchProtection
- type: createPullRequest
action_id: pr
title: Introduce yourself to the world
body: 04_add-image.md
head: add-images-links
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
with: 04_next.md
data:
url: '%actions.pagesUrl.data.html_url%'
prUrl: '%actions.pr.data.html_url%'
#5 - Add an image
- title: "Add an image"
description: "Learn how to place images in Markdown by adding your photo."
event: "pull_request.synchronize"
link: '{{ repoUrl }}/pull/3'
actions:
- type: getFileContents
filename: '_includes/02-image.md'
action_id: fileContents
- type: gate
left: '/!\[.+\]\(.+\)/g'
operator: test
right: '%actions.fileContents%'
else:
type: respond
with: 05_request-changes-image.md
- type: respond
with: 05_image-works-url.md
#6 - Add a profile link
- title: "Add a profile link"
description: "Learn how to create links in Markdown."
event: "pull_request.synchronize"
link: '{{ repoUrl }}/pull/3'
actions:
- type: getFileContents
filename: '_includes/03-links.md'
action_id: fileContents
- type: gate
left: '/!?\[.+\]\(.+\)/g'
operator: test
right: '%actions.fileContents%'
else:
type: respond
with: 06_request-changes-link.md
- type: removeBranchProtection
- type: respond
with: 06_success.md
#7 - Merge your image and link
- title: "Merge your image and link"
description: "Merge your second PR to introduce yourself to the world."
event: "pull_request.closed"
link: '{{ repoUrl }}/pull/3'
actions:
- type: gate
left: '%payload.pull_request.merged%'
- type: updateBranchProtection
- type: createPullRequest
title: A few of your favorite things
body: 07_pr-body.md
action_id: pr
head: add-lists-emphasis
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
with: 07_next.md
data:
url: '%actions.pagesUrl.data.html_url%'
prUrl: '%actions.pr.data.html_url%'
#8 - Add a list
- title: "Add a list"
description: "Learn to how to create ordered and unordered lists."
event: "pull_request.synchronize"
link: '{{ repoUrl }}/pull/4'
actions:
- type: getFileContents
filename: '_includes/04-lists.md'
action_id: fileContents
- type: gate
left: '/(?:\d\.|\*|-)\s.+/gm'
operator: test
right: '%actions.fileContents%'
else:
type: respond
with: 08_request-changes.md
- type: respond
with: 08_emphasis.md
#9 - Use emphasis
- title: "Use emphasis"
description: "Use bold and italics to emphasize text."
event: "pull_request.synchronize"
link: '{{ repoUrl }}/pull/4'
actions:
- type: getFileContents
filename: '_includes/05-emphasis.md'
action_id: fileContents
- type: gate
left: '/([*|_]{1,2}).+\1/gm'
operator: test
right: '%actions.fileContents%'
else:
type: respond
with: 09_request-changes.md
- type: removeBranchProtection
- type: respond
with: 09_success.md
#10 - Merge lists and emphasis
- title: "Merge lists and emphasis"
description: "Merge the last updates to your portfolio."
event: "pull_request.closed"
link: '{{ repoUrl }}/pull/4'
actions:
- type: gate
left: '%payload.pull_request.merged%'
- type: createIssue
title: More to learn
body: 10_more-to-learn.md
action_id: issue
- type: mergeBranch
head: add-theme
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
with: 10_next.md
data:
url: '%actions.pagesUrl.data.html_url%'
issueUrl: '%actions.issue.data.html_url%'
- type: octokit
method: repos.update
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
name: '%payload.repository.name%'
homepage: 'https://%payload.repository.owner.login%.github.io/%payload.repository.name%'