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

Commit f4b7d3f

Browse files
authored
Merge pull request #23 from githubtraining/org-owned
Change assumptions about repo owners
2 parents 71ff00a + 5a45348 commit f4b7d3f

File tree

9 files changed

+96
-44
lines changed

9 files changed

+96
-44
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Register for this course to get the starter files needed to build your Learning
88
- create responses
99
- publish a course to GitHub Learning Lab
1010

11-
**Note:** You'll need to be a owner of this organization in order to publish the course you create.
11+
**Note:** In order to publish your final course, you'll need to transfer it to your designated Learning Lab organization.

config.yml

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,52 @@ template:
55
name: lab-starter
66
repo: write-a-ll-course-template
77
before:
8+
- type: createIssue
9+
title: Welcome
10+
body: 00.0_welcome.md
11+
comments:
12+
- welcome-2.md
13+
- type: updateBranchProtection
14+
15+
# Repo artifacts:
16+
# 1. Issue: Welcome
17+
# 2. PR: Add a course title and description
18+
# 3. PR: Setup the learner's repo
19+
# 4. PR: Write the course steps
20+
# 5. Issue: Publish your course
21+
22+
steps:
23+
24+
# 1
25+
- title: Welcome
26+
description: Decide whether to complete a guided course, or use boilerplate as is.
27+
event: issues
28+
link: '{{ repoUrl }}/issues/1'
29+
actions:
30+
- type: gate
31+
left: '%payload.issue.title%'
32+
operator: ===
33+
right: Welcome
34+
- type: gate
35+
left: '%payload.action%'
36+
operator: ===
37+
right: closed
38+
required: false
39+
else:
40+
- type: gate
41+
left: '%payload.action%'
42+
operator: ===
43+
right: assigned
44+
- type: respond
45+
with: how-to-publish.md
46+
data:
47+
url: '%payload.repository.html_url%/fork'
48+
- type: respond
49+
with: change-mind.md
850
- type: createPullRequest
951
title: Add a course title and description
10-
body: 00.0_welcome.md
52+
body: 01.0_add-title.md
1153
head: title
12-
comments:
13-
- 01.0_add-title.md
1454
action_id: metaPR
1555
- type: assignRegistrant
1656
issue: '%actions.metaPR.data.number%'
@@ -26,17 +66,12 @@ before:
2666
title: My amazing course
2767
```
2868
position: 6
29-
- type: updateBranchProtection
30-
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-
37-
steps:
69+
- type: respond
70+
with: goto-first-pr.md
71+
data:
72+
url: '%actions.metaPR.data.html_url%'
3873

39-
# 1
74+
# 2
4075
- title: Give your course a title
4176
description: Name your course so learners can find it.
4277
event: pull_request.synchronize
@@ -79,7 +114,7 @@ steps:
79114
```
80115
position: 8
81116

82-
# 2
117+
# 3
83118
- title: Add some descriptions to your course
84119
description: Give your course a description and tagline so learners can identify it.
85120
link: '{{ repoUrl }}/pull/1'
@@ -99,7 +134,7 @@ steps:
99134
- type: respond
100135
with: approve-first-pr.md
101136

102-
# 3
137+
# 4
103138
- title: Approve the course metadata
104139
description: Approve the pull request containing the course's metadata.
105140
link: '{{ repoUrl }}/pull/1'
@@ -134,7 +169,7 @@ steps:
134169
```
135170
position: 7
136171

137-
# 4
172+
# 5
138173
- title: Point to the template repo
139174
description: Designate a template repository from which to clone.
140175
link: '{{ repoUrl }}/pull/2'
@@ -165,7 +200,7 @@ steps:
165200
```
166201
position: 6
167202

168-
# 5
203+
# 6
169204
- title: Give the learner's repo a name
170205
description: Designate a name for the repository when it is created for the learner.
171206
link: '{{ repoUrl }}/pull/2'
@@ -185,7 +220,7 @@ steps:
185220
- type: respond
186221
with: approve-second-pr.md
187222

188-
# 6
223+
# 7
189224
- title: Approve the repo setup
190225
description: Approve the template repo information
191226
link: '{{ repoUrl }}/pull/2'
@@ -244,7 +279,7 @@ steps:
244279
```
245280
position: 9
246281

247-
# 7
282+
# 8
248283
- title: Create an issue using Learning Lab
249284
description: Use the `before` block to create an issue in the learner's repo.
250285
link: '{{ repoUrl }}/pull/3'
@@ -265,7 +300,7 @@ steps:
265300
data:
266301
fileUrl: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%/responses?filename=responses/welcome-text.md'
267302

268-
# 8
303+
# 9
269304
- title: Create your first response
270305
description: Add content to the repo's first issue.
271306
link: '{{ repoUrl }}/pull/3'
@@ -319,7 +354,7 @@ steps:
319354
```
320355
position: 20
321356

322-
# 9
357+
# 10
323358
- title: Name your first step and give it a description
324359
description: Identify the first step so the learner knows what's expected.
325360
link: '{{ repoUrl }}/pull/3'
@@ -350,7 +385,7 @@ steps:
350385
```
351386
position: 21
352387

353-
# 10
388+
# 11
354389
- title: Trigger your first step with a GitHub event
355390
description: Add a pull_request.opened event.
356391
link: '{{ repoUrl }}/pull/3'
@@ -381,7 +416,7 @@ steps:
381416
```
382417
position: 32
383418

384-
# 11
419+
# 12
385420
- title: Validate a learner's PR
386421
description: Add a gate to determine if the learner took the expected action.
387422
link: '{{ repoUrl }}/pull/3'
@@ -436,7 +471,7 @@ steps:
436471
```
437472
position: 35
438473

439-
# 12
474+
# 13
440475
- title: Use contextual information to validate
441476
description: Add options to the gate action.
442477
link: '{{ repoUrl }}/pull/3'
@@ -481,7 +516,7 @@ steps:
481516
```
482517
position: 37
483518

484-
# 13
519+
# 14
485520
- title: Respond to a learner's successful PR
486521
description: Use a respond action when a learner opens their pull request.
487522
link: '{{ repoUrl }}/pull/3'
@@ -502,7 +537,7 @@ steps:
502537
data:
503538
fileUrl: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=README.md'
504539

505-
# 14
540+
# 15
506541
- title: Add a README to your course
507542
description: Write a longform description for your course.
508543
link: '{{ repoUrl }}/pull/3'
@@ -523,7 +558,7 @@ steps:
523558
- type: respond
524559
with: 13.0_publish.md
525560

526-
# 15
561+
# 16
527562
- title: Approve the steps
528563
description: Submit an approval for the steps pull request.
529564
link: '{{ repoUrl }}/pull/3'
@@ -538,6 +573,11 @@ steps:
538573
title: Publish your course
539574
body: 14.0_congratulations.md
540575
action_id: publishIssue
576+
- type: respond
577+
issue: '%actions.publishIssue.data.number%'
578+
with: how-to-publish.md
579+
data:
580+
url: '%payload.repository.html_url%/fork'
541581
- type: respond
542582
with: goto-publish.md
543583
data:

responses/00.0_welcome.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# Welcome!
22

3-
:running_woman: If you look around this repository, you'll find a few standard template files in your Code tab. These contain most of what you need to get a Learning Lab course up and running. You can take this code as-is and create a Learning Lab course on your own. If you'd like some guidance, continue taking this course!
3+
:running_woman: If you look around this repository, you'll find a few standard template files in your Code tab. These contain most of what you need to get a Learning Lab course up and running. You can take this code as-is and create a Learning Lab course on your own.
44

5-
:book: The official [Learning Lab docs](https://github.github.com/learning-lab-equipment/#/) contain full instructions on how to create courses. We'll link to the docs throughout the course. Take a look if you'd like more information about steps we take in this course.
5+
### How do you prefer to work?
66

7-
### New to GitHub?
8-
9-
For this course, you'll need to know how to create a branch on GitHub, commit changes using Git, and open a pull request on GitHub. If you need a refresher on the GitHub flow, check out [the Introduction to GitHub course]({{ host}}/courses/introduction-to-github).
10-
11-
You'll also need a general understanding of webhooks and the GitHub API. [The Getting started with GitHub Apps course]({{ host}}/courses/getting-started-with-github-apps) is a good place to start.
7+
- :octocat: For a fully guided course writing experience, close this issue.
8+
- :car: If you'd like to work on your own, assign this issue to yourself.

responses/14.0_congratulations.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
## Nice work!
22

3-
Now that your changes are on `master`, you're ready to publish the course.
4-
5-
## Publish the course
6-
1. Confirm that you are an owner of the **{{ owner }}** organization, or a member of a team named **lab-assistants** in the **{{ owner }}** organization.
7-
1. Navigate to https://lab-sandbox.github.com/{{ owner }}/new.
8-
1. In the Repository name field, type in **{{ repo }}**
9-
1. We recommend selecting **Private** so you can test the course with other members of the organization before making it public.
10-
11-
Now...[what will you learn next]({{ host }}/courses)?
3+
You're ready to publish the course.

responses/change-mind.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
We'll continue the course instructions in case you change your mind and would like to continue. If you do, just return to this issue to pick it up where you left off.

responses/goto-first-pr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Let's go to the [first PR]({{ url }}) which I've opened for you.

responses/goto-transfer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Let's take a look at some [instructions for transferring this repo]({{ url }}).

responses/how-to-publish.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Since Learning Lab courses must be owned by your organization, you'll need to [fork](https://help.github.com/articles/fork-a-repo/) the course and template repositories there first. Here are the instructions:
2+
3+
## Publish the course
4+
1. Choose an organization that will house your Learning Lab courses. You may have done this prior to taking the course.
5+
1. Confirm that you are an owner of the chosen Learning Lab course organization, or a member of a team named **lab-assistants** in that organization.
6+
1. [Fork this repository]({{ url }}) to your chosen organization.
7+
1. [Fork the template repository](https://github.com/githubtraining/lab-starter-template/fork) to your chosen organization.
8+
1. Navigate to `https://lab-sandbox.github.com/YOUR-ORGANIZATION/new`
9+
1. In the Repository name field, type in **{{ repo }}**
10+
1. We recommend selecting **Private** so you can test the course with other members of the organization before making it public.
11+
1. Take the course, which should be available at https://lab-sandbox.github.com/YOUR-ORGANIZATION/{{ repo }}

responses/welcome-2.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Documentation
2+
3+
:book: The official [Learning Lab docs](https://github.github.com/learning-lab-equipment/#/) contain full instructions on how to create courses. We'll link to the docs throughout the course. Take a look if you'd like more information about steps we take in this course.
4+
5+
### New to GitHub?
6+
7+
For this course, you'll need to know how to create a branch on GitHub, commit changes using Git, and open a pull request on GitHub. If you need a refresher on the GitHub flow, check out [the Introduction to GitHub course]({{ host}}/courses/introduction-to-github).
8+
9+
You'll also need a general understanding of webhooks and the GitHub API. [The Getting started with GitHub Apps course]({{ host}}/courses/getting-started-with-github-apps) is a good place to start.

0 commit comments

Comments
 (0)