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 29
/
Copy pathconfig.yml
296 lines (296 loc) · 8.96 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
title: GitHub Pages
tagline: Your sidekick in using GitHub Pages and blogs
description: >-
Learn how to create a site or blog from your GitHub repositories with GitHub
Pages.
tags:
- GitHub
- GitHub Pages
template:
name: github-pages-with-jekyll
repo: github-pages-with-jekyll-template
preferences:
- type: dropdown
name: language
label: Language
description: Choose your preferred language.
options:
- label: English
value: en
- label: Español
value: es
before:
- type: createIssue
title: Welcome
body: 00_class-introduction-issue.md
steps:
- title: Generate a GitHub Pages site
description: Generate a GitHub Pages site with the automatic page generator.
translations:
es:
title: Activa GitHub Pages
description: >-
Gnera un sitio web con el generador automático de páginas GitHub
Pages.
event: page_build
link: '{{ repoUrl }}/issues/1'
actions:
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
issue: 1
with: 01_update-index.md
data:
deploymentUrl: '%actions.pagesUrl.data.html_url%'
- type: updateBranchProtection
- title: Customize your homepage
description: Open a pull request with changes to the homepage.
translations:
es:
title: Personaliza tu página inicial
description: Abre un pull request con cambios en la página inicial.
event: pull_request.opened
link: '{{ repoUrl }}/issues'
actions:
- type: gate
left: '%payload.pull_request.body%'
required: false
else:
type: respond
with: 02_pull-request-blank.md
- type: getTree
action_id: tree
sha: '%payload.pull_request.head.sha%'
- type: createReview
body: 02_merge-pr.md
event: APPROVE
data:
branch: '%payload.pull_request.head.ref%'
- type: closeIssue
issue: Welcome
- title: Merge your pull request
description: Merge the pull request that customizes your homepage.
translations:
es:
title: Combina tu pull request
description: Combina el pull request que personaliza tu página inicial.
event: pull_request.closed
link: '{{ repoUrl }}/pulls'
actions:
- type: gate
left: '%payload.pull_request.merged%'
- type: gate
left: '%payload.pull_request.base.ref%'
operator: ===
right: main
- type: updateBranchProtection
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: createIssue
action_id: issue
title: Getting ready to blog
body: 03_change-theme.md
data:
deploymentUrl: '%actions.pagesUrl.data.html_url%'
- type: respond
with: 03_merged-pr.md
data:
url: '%actions.issue.data.html_url%'
- title: Customize site details
description: Edit the configuration file to display your information.
translations:
es:
title: Personaliza los detalles del sitio
description: Edita el archivo de configuración para mostrar tu información.
event: pull_request
link: '{{ repoUrl }}/issues'
actions:
- type: gate
gates:
- left: '%payload.action%'
operator: ===
right: opened
- left: '%payload.action%'
operator: ===
right: synchronize
- type: gate
required: false
left: '%payload.action%'
operator: '!=='
right: opened
else:
type: closeIssue
issue: Getting ready to blog
- type: gate
required: false
left: '%payload.pull_request.body%'
else:
type: respond
with: 02_pull-request-blank.md
- type: getFileContents
filename: _config.yml
action_id: file
- type: gate
left: '/^theme:\s?minima$/m'
operator: test
right: '%actions.file%'
else:
type: createReview
event: REQUEST_CHANGES
body: 04_wrong-theme.md
- type: createReview
event: COMMENT
body: 04_create-blog-post.md
data:
branch: '%payload.pull_request.head.ref%'
date: '%payload.pull_request.created_at%'
- title: Create a blog post
description: Create a new file that will become your first blog post.
translations:
es:
title: Crea un post
description: Crea un nuevo archivo que se convertirá en el primer post de tu blog.
event: pull_request.synchronize
link: '{{ repoUrl }}/pulls'
actions:
- type: getTree
action_id: tree
recursive: true
sha: '%payload.pull_request.head.sha%'
- type: gate
action_id: directory
required: false
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/^_posts/'
- type: gate
action_id: filenumber
required: false
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/\d{4}-\d{2}-\d{2}/'
- type: gate
action_id: post
required: false
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/[a-zA-Z]\.md$/'
- type: gate
action_id: extension
required: false
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/\.md$/'
- type: gate
action_id: filename
required: false
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/(^|\/)\d{4}-\d{2}-\d{2}-.*\.md$/'
- type: gate
every: true
gates:
- left: '%actions.directory%'
- left: '%actions.filenumber%'
- left: '%actions.post%'
- left: '%actions.extension%'
- left: '%actions.filename%'
else:
- type: createReview
body: 05_incorrect-post.md
event: REQUEST_CHANGES
data:
directory: '%actions.directory%'
filenumber: '%actions.filenumber%'
post: '%actions.post%'
extension: '%actions.extension%'
filename: '%actions.filename%'
- type: createReview
body: 05_add-front-matter.md
event: COMMENT
- title: Add blog post metadata
description: Add YAML front matter to the blog post to display the title and date.
translations:
es:
title: Añade metadatos al post
description: Añade texto preliminar YAML al post para mostrar el título y la fecha.
event: pull_request.synchronize
link: '{{ repoUrl }}/pulls'
actions:
- type: getTree
action_id: tree
recursive: true
sha: '%payload.pull_request.head.sha%'
- type: findInTree
action_id: file
tree: '%actions.tree.data.tree%'
path: '/^_posts\/\d{4}-\d{2}-\d{2}-.*\.md$/'
- type: getFileContents
filename: '%actions.file.path%'
action_id: contents
- type: gate
required: false
action_id: dashes
left: '/^-{3}[\s\S]+-{3}/'
operator: test
right: '%actions.contents%'
- type: gate
required: false
action_id: title
left: '/^title:\s?["''].+["'']$/m'
operator: test
right: '%actions.contents%'
- type: gate
required: false
action_id: date
left: '/^date:\s?\d{4}-\d{2}-\d{2}/m'
operator: test
right: '%actions.contents%'
- type: gate
every: true
gates:
- left: '%actions.dashes%'
- left: '%actions.title%'
- left: '%actions.date%'
else:
- type: createReview
body: 06_incorrect-front-matter.md
event: REQUEST_CHANGES
data:
date: '%actions.date%'
title: '%actions.title%'
dashes: '%actions.dashes%'
- type: removeBranchProtection
- type: createReview
body: 06_merge-and-celebrate.md
event: APPROVE
- title: Merge your first post
description: >-
Merge the pull request so your blog post will appear on your GitHub Pages
site.
translations:
es:
title: Combina tu primer post
description: >-
Combina el pull request para que tu post aparezca en tu sitio de
GitHub Pages.
event: pull_request.closed
link: '{{ repoUrl }}/pulls'
actions:
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: gate
left: '%payload.pull_request.merged%'
- type: respond
with: 07_next-steps.md
data:
deploymentUrl: '%actions.pagesUrl.data.html_url%'