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

Commit 557f39e

Browse files
authored
Merge pull request #20 from githubtraining/consistent-titles
Consistent titles
2 parents 514cf03 + 3cc074d commit 557f39e

17 files changed

+93
-43
lines changed

config.yml

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ before:
2828
position: 6
2929
- type: updateBranchProtection
3030

31+
# Repo artifacts:
32+
# 1. PR: Add a course title and description
33+
# 2. PR: Setup the learner's repo
34+
# 3. PR: Write the course steps
35+
# 4. Issue: Publish your course
36+
3137
steps:
3238

33-
# 2
39+
# 1
3440
- title: Give your course a title
35-
description: Give your course a title
41+
description: Name your course so learners can find it.
3642
event: pull_request.synchronize
3743
link: '{{ repoUrl }}/pull/1'
3844
actions:
@@ -73,9 +79,10 @@ steps:
7379
```
7480
position: 8
7581

76-
# 12
82+
# 2
7783
- title: Add some descriptions to your course
78-
description: Add some descriptions to your course
84+
description: Give your course a description and tagline so learners can identify it.
85+
link: '{{ repoUrl }}/pull/1'
7986
event: pull_request.synchronize
8087
actions:
8188
- type: getFileContents
@@ -92,8 +99,10 @@ steps:
9299
- type: respond
93100
with: approve-first-pr.md
94101

102+
# 3
95103
- title: Approve the course metadata
96-
description: Approve the course metadata
104+
description: Approve the pull request containing the course's metadata.
105+
link: '{{ repoUrl }}/pull/1'
97106
event: pull_request_review.submitted
98107
actions:
99108
- type: gate
@@ -125,9 +134,10 @@ steps:
125134
```
126135
position: 7
127136

128-
# 3
137+
# 4
129138
- title: Point to the template repo
130-
description: Point to the template repo
139+
description: Designate a template repository from which to clone.
140+
link: '{{ repoUrl }}/pull/2'
131141
event: pull_request.synchronize
132142
actions:
133143
- type: getFileContents
@@ -155,9 +165,10 @@ steps:
155165
```
156166
position: 6
157167

158-
# 4
168+
# 5
159169
- title: Give the learner's repo a name
160-
description: Give the learner's repo a name
170+
description: Designate a name for the repository when it is created for the learner.
171+
link: '{{ repoUrl }}/pull/2'
161172
event: pull_request.synchronize
162173
actions:
163174
- type: getFileContents
@@ -174,8 +185,10 @@ steps:
174185
- type: respond
175186
with: approve-second-pr.md
176187

188+
# 6
177189
- title: Approve the repo setup
178-
description: Approve the repo setup
190+
description: Approve the template repo information
191+
link: '{{ repoUrl }}/pull/2'
179192
event: pull_request_review.submitted
180193
actions:
181194
- type: gate
@@ -231,9 +244,10 @@ steps:
231244
```
232245
position: 9
233246

234-
# 5
247+
# 7
235248
- title: Create an issue using Learning Lab
236-
description: Create an issue using Learning Lab
249+
description: Use the `before` block to create an issue in the learner's repo.
250+
link: '{{ repoUrl }}/pull/3'
237251
event: pull_request.synchronize
238252
actions:
239253
- type: getFileContents
@@ -251,9 +265,10 @@ steps:
251265
data:
252266
fileUrl: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%/responses?filename=responses/welcome-text.md'
253267

254-
# 6
268+
# 8
255269
- title: Create your first response
256-
description: Create your first response
270+
description: Add content to the repo's first issue.
271+
link: '{{ repoUrl }}/pull/3'
257272
event: pull_request.synchronize
258273
actions:
259274
- type: getTree
@@ -304,9 +319,10 @@ steps:
304319
```
305320
position: 20
306321

307-
# 7
322+
# 9
308323
- title: Name your first step and give it a description
309-
description: Name your first step and give it a description
324+
description: Identify the first step so the learner knows what's expected.
325+
link: '{{ repoUrl }}/pull/3'
310326
event: pull_request.synchronize
311327
actions:
312328
- type: getFileContents
@@ -334,9 +350,10 @@ steps:
334350
```
335351
position: 21
336352

337-
# 8
353+
# 10
338354
- title: Trigger your first step with a GitHub event
339-
description: Trigger your first step with a GitHub event
355+
description: Add a pull_request.opened event.
356+
link: '{{ repoUrl }}/pull/3'
340357
event: pull_request.synchronize
341358
actions:
342359
- type: getFileContents
@@ -364,9 +381,10 @@ steps:
364381
```
365382
position: 32
366383

367-
# 9
384+
# 11
368385
- title: Validate a learner's PR
369-
description: Validate a learner's PR
386+
description: Add a gate to determine if the learner took the expected action.
387+
link: '{{ repoUrl }}/pull/3'
370388
event: pull_request.synchronize
371389
actions:
372390
- type: getFileContents
@@ -418,9 +436,10 @@ steps:
418436
```
419437
position: 35
420438

421-
# 10
439+
# 12
422440
- title: Use contextual information to validate
423-
description: Use contextual information to validate
441+
description: Add options to the gate action.
442+
link: '{{ repoUrl }}/pull/3'
424443
event: pull_request.synchronize
425444
actions:
426445
- type: getFileContents
@@ -462,9 +481,10 @@ steps:
462481
```
463482
position: 37
464483

465-
# 11
484+
# 13
466485
- title: Respond to a learner's successful PR
467-
description: Respond to a learner's successful PR
486+
description: Use a respond action when a learner opens their pull request.
487+
link: '{{ repoUrl }}/pull/3'
468488
event: pull_request.synchronize
469489
actions:
470490
- type: getFileContents
@@ -482,9 +502,10 @@ steps:
482502
data:
483503
fileUrl: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=README.md'
484504

485-
# 13
505+
# 14
486506
- title: Add a README to your course
487-
description: Add a README to your course
507+
description: Write a longform description for your course.
508+
link: '{{ repoUrl }}/pull/3'
488509
event: pull_request.synchronize
489510
actions:
490511
- type: getTree
@@ -502,8 +523,10 @@ steps:
502523
- type: respond
503524
with: 13.0_publish.md
504525

526+
# 15
505527
- title: Approve the steps
506-
description: Approve the steps
528+
description: Submit an approval for the steps pull request.
529+
link: '{{ repoUrl }}/pull/3'
507530
event: pull_request_review.submitted
508531
actions:
509532
- type: gate

responses/01.0_add-title.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
In the next couple of steps we'll [:book: Set up the course](https://github.github.com/learning-lab-equipment/#/3-4-yaml?id=set-up-the-course).
22

3-
## Step 2: Name your course
3+
## Step 1: Name your course
44

55
Now, let's give your course a title.
66

responses/02.0_add-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ First, how will this content help teach the concept? For example, if a course is
99

1010
Second, is the finished product useful? At the end of the course, the finished repository should serve a purpose aside from the lessons. A working game, a portfolio or resume, or a collection of template documents are a few examples.
1111

12-
## Step 3: Designate a template repository
12+
## Step 4: Designate a template repository
1313
Let's add our own template repository. To speed things up, we've created a template repository for you. We recommend using our template for this course.
1414

1515
### :keyboard: Activity: Add a template repository

responses/03.0_add-repo-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Awesome! Whenever a user registers for this course, Learning Lab will create a new repository for them based on `lab-starter-template`.
22

3-
## Step 4: Name the repository
3+
## Step 5: Name the repository
44

55
`lab-starter-template` is a great template repository, and it's named to reflect that. But, we want the user to experience that repository through a _different_ name. We can designate that name in the `config.yml`.
66

responses/04.0_create-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Anything in this block occurs before the learner can access their course reposit
66
### Learning Lab actions
77
Actions are reusable modules that each course has access to. They are each designed to do very specific things, and nothing more. This is to optimize for reusability and simplicity. The documentation contains a listing of [:book: all available actions](https://github.github.com/learning-lab-equipment/#/actions/).
88

9-
## Step 5: Add to the `before` block
9+
## Step 7: Add to the `before` block
1010

1111
We'll use the [:book: `createIssue` action](https://github.github.com/learning-lab-equipment/#/actions/createIssue/) to create an issue for the learner with some initial instructions. The `createIssue` action requires two [:book: options](https://github.github.com/learning-lab-equipment/#/actions/createIssue/?id=options):
1212
- a title

responses/05.0_add-response.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Great! Now, the repository will have an issue for the learner.
22

3-
## Step 6: Creating a response
3+
## Step 9: Creating a response
44

55
In the last step, we referenced a file titled `welcome-text.md`, but it doesn't exist. Learning Lab automatically looks in the [:book: `responses/` directory](https://github.github.com/learning-lab-equipment/#/3-5-responses) for all content files. Let's add it.
66

responses/06.0_add-first-step.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For example, you _could_ write a lot of text and have the user close the issue w
1212
See [:book: best practices](https://github.github.com/learning-lab-equipment/#/3-5-responses?id=best-practices) in the Learning Lab docs for more suggestions.
1313
</details>
1414

15-
## Step 7: Naming our first step
15+
## Step 9: Naming our first step
1616

1717
Let's name our first step. We will give it a **title** and a **description**. These will be shown on Learning Lab, and they help course authors stay organized in the `config.yml` file. The docs show [:book: syntax and examples](https://github.github.com/learning-lab-equipment/#/3-4-yaml?id=relevant-syntax-1) of how steps are shown to the learner.
1818

responses/07.0_add-trigger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Great! Your learner now has information about what they're expected to do in thi
33
### Events
44
Every step in a course will be triggered by a GitHub Event. All possible events are documented in [Events Types & Payloads on the GitHub Developer Guide](https://developer.github.com/v3/activity/events/types/).
55

6-
## Step 8: Add an event
6+
## Step 10: Add an event
77
Let's now find the `event` that will trigger the step. Because we want the learner to open a new Pull Request, the event we're looking for is [`pull_request`](https://developer.github.com/v3/activity/events/types/#pullrequestevent). Whenever this event occurs, information about the pull request is delivered to Learning Lab. However, if we just write `pull_request`, _any_ interaction with a pull request will cause this step to be triggered. We're specifically looking for the learner to _open a pull request_. We can filter the event to only opened pull requests by using `pull_request.opened` instead.
88

99
### :keyboard: Add an event

responses/08.0_validate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The events that can act as triggers help Learning Lab know when something happen
44

55
Course authors can use **gates** to be validate the user's completion of a step. A [:book: `gate`](https://github.github.com/learning-lab-equipment/#/actions/gate/) is a Learning Lab action. Gates are conditionals, and they behave much like a conditional in Javascript. Let's add a `gate`, we'll specify its options in a later step.
66

7-
## Step 9: Add a gate
7+
## Step 11: Add a gate
88

99
Let's now validate the learner's PR. We asked them to title the pull request "Add name to README" so that's what we need to validate against.
1010

responses/09.0_add-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Step 10: Add validation
1+
### Step 12: Add validation
22
We need to validate against the learner's pull request title. This information is accessible to us [:book: from the payload](https://github.github.com/learning-lab-equipment/#/3-3-writing-steps?id=accessing-payload-data) that is sent with the event. In this case, the information was sent from a `pull_request.opened` event.
33

44
You can see an example of all the information sent [in the GitHub Developer docs](https://developer.github.com/v3/activity/events/types/#webhook-payload-example-26).

0 commit comments

Comments
 (0)