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

Commit 6765e50

Browse files
authored
Merge pull request #19 from githubtraining/audit
Course audit
2 parents 3a614e9 + 9f98dcf commit 6765e50

18 files changed

+286
-314
lines changed

config.yml

+166-174
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,182 @@
1-
title: "Introduction to GitHub"
2-
tagline: "Your sidekick for getting started on GitHub"
3-
description: "If you are looking for a quick and fun introduction to GitHub, you've found it. This class will get you started using GitHub in less than an hour."
1+
title: Introduction to GitHub
2+
tagline: Your sidekick for getting started on GitHub
3+
description: If you are looking for a quick and fun introduction to GitHub, you've found it. This class will get you started using GitHub in less than an hour.
44
template:
5-
name: "github-slideshow"
6-
repo: "caption-this-template"
7-
description: "A robot powered training repository :robot:"
5+
name: github-slideshow
6+
repo: caption-this-template
7+
description: 'A robot powered training repository :robot:'
88
preferences:
9-
- type: radio
10-
name: gitTool
11-
label: Preferred Git tool
12-
description: Learn right from the web UI, or using your chosen tool
13-
options:
14-
- label: Use the GitHub.com web interface
15-
value: dotcom
16-
- label: Use the command line
17-
value: cli
9+
- type: radio
10+
name: gitTool
11+
label: Preferred Git tool
12+
description: Learn right from the web UI, or using your chosen tool
13+
options:
14+
- label: Use the GitHub.com web interface
15+
value: dotcom
16+
- label: Use the command line
17+
value: cli
18+
- label: Use Visual Studio Code
19+
value: vscode
1820
before:
19-
- type: updateBranchProtection
20-
- type: createIssue
21-
title: Getting Started with GitHub
22-
body: "introduction.md"
23-
comments:
24-
- "assign-yourself.md"
21+
- type: updateBranchProtection
22+
- type: createIssue
23+
title: Getting Started with GitHub
24+
body: introduction.md
25+
comments:
26+
- assign-yourself.md
27+
28+
# Course artifacts:
29+
# 1. Issue: Getting started with GitHub
30+
# 2. Issue: Your first contribution
31+
# 3. PR: [Created by learner]
32+
2533
steps:
26-
- title: "Assign yourself"
27-
description: "Assign the first issue to yourself."
28-
event: "issues.assigned"
29-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/issues/1
30-
actions:
31-
- type: gate
32-
left: "%payload.assignee.login%"
33-
operator: "==="
34-
right: "%user.username%"
35-
- type: respond
36-
with: "turn-on-gh-pages.md"
3734

38-
- title: "Turn on GitHub Pages"
39-
description: "Turn on GitHub Pages in the settings page of the repository."
40-
event: "deployment"
41-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/settings
42-
actions:
43-
- type: respond
44-
issue: "Getting Started with GitHub"
45-
with: "close-issue.md"
35+
# 1
36+
- title: Assign yourself
37+
description: Assign the first issue to yourself.
38+
event: issues.assigned
39+
link: '{{ repoUrl }}/issues/1'
40+
actions:
41+
- type: gate
42+
left: '%payload.assignee.login%'
43+
operator: ===
44+
right: '%user.username%'
45+
- type: respond
46+
with: turn-on-gh-pages.md
4647

47-
- title: Close an issue
48-
description: Cease a conversation by closing an issue.
49-
event: issues.closed
50-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/issues/1
51-
actions:
52-
- type: createIssue
53-
action_id: contrib_issue
54-
title: Your first contribution
55-
body: your-first-contribution.md
56-
comments:
57-
- create-a-branch.md
58-
data:
59-
thePayload: '%payload%'
60-
- type: respond
61-
with: head-to-branch.md
62-
data:
63-
issueURL: '%actions.contrib_issue.data.html_url%'
48+
# 2
49+
- title: Turn on GitHub Pages
50+
description: Turn on GitHub Pages in the settings page of the repository.
51+
event: deployment
52+
link: '{{ repoUrl }}/issues/1'
53+
actions:
54+
- type: respond
55+
issue: Getting Started with GitHub
56+
with: close-issue.md
6457

65-
- title: "Create a branch"
66-
description: "Create a branch for introducing new changes."
67-
event: "create"
68-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/
69-
actions:
70-
- type: respond
71-
issue: "Your first contribution"
72-
with: commit-something.md
73-
data:
74-
thePayload: '%payload%'
58+
# 3
59+
- title: Close an issue
60+
description: Cease a conversation by closing an issue.
61+
event: issues.closed
62+
link: '{{ repoUrl }}/issues/1'
63+
actions:
64+
- type: createIssue
65+
action_id: contrib_issue
66+
title: Your first contribution
67+
body: your-first-contribution.md
68+
comments:
69+
- create-a-branch.md
70+
data:
71+
thePayload: '%payload%'
72+
- type: respond
73+
with: head-to-branch.md
74+
data:
75+
issueURL: '%actions.contrib_issue.data.html_url%'
7576

76-
- title: "Commit a file"
77-
description: "Commit your file to the branch."
78-
event: "push"
79-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/
80-
actions:
81-
- type: respond
82-
issue: "Your first contribution"
83-
with: "open-a-pr.md"
84-
data:
85-
branch: "%payload.ref%"
77+
# 4
78+
- title: Create a branch
79+
description: Create a branch for introducing new changes.
80+
event: create
81+
link: '{{ repoUrl }}/issues/2'
82+
actions:
83+
- type: respond
84+
issue: Your first contribution
85+
with: commit-something.md
86+
data:
87+
thePayload: '%payload%'
8688

87-
- title: "Open a pull request"
88-
description: "Open a pull request to propose your new file to the codebase."
89-
event: "pull_request"
90-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/compare?expand=1
91-
actions:
92-
- type: gate
93-
gates:
94-
- left: "%payload.action%"
95-
operator: "==="
96-
right: "opened"
97-
- left: "%payload.action%"
98-
operator: "==="
99-
right: "edited"
100-
- type: closeIssue
101-
issue: "Your first contribution"
102-
- type: createStatus
103-
state:
104-
left: "%payload.pull_request.body%"
105-
failure:
106-
description: Your pull request needs a description in the body. Please edit the pull request to include a body.
107-
target_url: https://help.github.com/articles/editing-a-comment/
108-
success:
109-
description: Your pull request has a body description.
110-
target_url: https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request
111-
- type: createStatus
112-
state:
113-
left: "%payload.pull_request.base.ref%"
114-
operator: "==="
115-
right: master
116-
success:
117-
description: Your pull request is based off of the master branch.
118-
target_url: https://help.github.com/articles/about-comparing-branches-in-pull-requests/
119-
failure:
120-
description: Your pull request is NOT based off of the master branch. Please close this pull request and open a new one.
121-
target_url: https://help.github.com/articles/about-comparing-branches-in-pull-requests/
122-
- type: gate
123-
left: "%payload.pull_request.body%"
124-
else:
125-
- type: createReview
126-
body: "fix-body.md"
127-
event: REQUEST_CHANGES
128-
- type: gate
129-
left: "%payload.pull_request.base.ref%"
130-
operator: "==="
131-
right: master
132-
else:
133-
- type: createReview
134-
body: "fix-base.md"
135-
event: REQUEST_CHANGES
136-
- type: getTree
137-
- type: createReview
138-
body: request-changes.md
139-
event: 'COMMENT'
140-
data:
141-
branch: '%payload.pull_request.head.ref%'
89+
# 5
90+
- title: Commit a file
91+
description: Commit your file to the branch.
92+
event: push
93+
link: '{{ repoUrl }}/issues/2'
94+
actions:
95+
- type: respond
96+
issue: Your first contribution
97+
with: open-a-pr.md
98+
data:
99+
branch: '%payload.ref%'
100+
url: '%payload.repository.html_url%/compare/%payload.ref%?expand=1'
142101

102+
# 6
103+
- title: Open a pull request
104+
description: Open a pull request to propose your new file to the codebase.
105+
event: pull_request
106+
link: '{{ repoUrl }}/issues/2'
107+
actions:
108+
- type: gate
109+
gates:
110+
- left: '%payload.action%'
111+
operator: ===
112+
right: opened
113+
- left: '%payload.action%'
114+
operator: ===
115+
right: edited
116+
- type: closeIssue
117+
issue: Your first contribution
118+
- type: gate
119+
left: '%payload.pull_request.body%'
120+
else:
121+
- type: createReview
122+
body: fix-body.md
123+
event: REQUEST_CHANGES
124+
- type: gate
125+
left: '%payload.pull_request.base.ref%'
126+
operator: ===
127+
right: master
128+
else:
129+
- type: createReview
130+
body: fix-base.md
131+
event: REQUEST_CHANGES
132+
- type: getTree
133+
action_id: tree
134+
recursive: true
135+
sha: '%payload.pull_request.head.sha%'
136+
- type: gate
137+
left: '%actions.tree.data.tree%'
138+
operator: includes
139+
right: path:_posts/0000-01-02-%user.username%.md
140+
else:
141+
- type: createReview
142+
body: fix-filename.md
143+
event: REQUEST_CHANGES
144+
data:
145+
expected: _posts/0000-01-02-%user.username%.md
146+
url: '%payload.pull_request.html_url%/files'
147+
- type: createReview
148+
body: request-changes.md
149+
event: 'COMMENT'
150+
data:
151+
branch: '%payload.pull_request.head.ref%'
152+
url: '%payload.pull_request.html_url%/files'
143153

144-
- title: "Respond to a review"
145-
description: "Respond to a PR review."
146-
event: "pull_request.synchronize"
147-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/pull/3
148-
actions:
149-
- type: removeBranchProtection
150-
- type: createStatus
151-
state:
152-
left: "%pull_request.body%"
153-
failure:
154-
description: Your pull request needs a description in the body. Please edit the pull request to include a body.
155-
target_url: https://help.github.com/articles/editing-a-comment/
156-
success:
157-
description: Your pull request has a body description.
158-
target_url: https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request
159-
- type: createStatus
160-
state:
161-
left: "%payload.pull_request.base.label%"
162-
operator: "==="
163-
right: "%user.username%:master"
164-
success:
165-
description: Your pull request is based off of the master branch.
166-
target_url: https://help.github.com/articles/about-comparing-branches-in-pull-requests/
167-
failure:
168-
description: Your pull request is NOT based off of the master branch. Please close this pull request and open a new one.
169-
target_url: https://help.github.com/articles/about-comparing-branches-in-pull-requests/
170-
- type: createReview
171-
body: pr-succeeds.md
172-
event: APPROVE
173-
data:
174-
branch: '%payload.pull_request.head.ref%'
154+
# 7
155+
- title: Respond to a review
156+
description: Respond to a PR review.
157+
event: pull_request.synchronize
158+
link: '{{ repoUrl }}/pull/3'
159+
actions:
160+
- type: removeBranchProtection
161+
- type: createReview
162+
body: pr-succeeds.md
163+
event: APPROVE
164+
data:
165+
branch: '%payload.pull_request.head.ref%'
175166

176-
- title: "Merge your pull request"
177-
description: "Make your changes live by merging your PR."
178-
event: "pull_request.closed"
179-
link: https://github.com/{{ user.username }}/{{ course.template.name }}/pull/3
180-
actions:
181-
- type: gate
182-
left: "%payload.pull_request.merged%"
183-
else:
184-
- type: respond
185-
with: "reopen.md"
167+
# 8
168+
- title: Merge your pull request
169+
description: Make your changes live by merging your PR.
170+
event: pull_request.closed
171+
link: '{{ repoUrl }}/pull/3'
172+
actions:
173+
- type: gate
174+
left: '%payload.pull_request.merged%'
175+
else:
186176
- type: respond
187-
with: "reminder-delete.md"
177+
with: reopen.md
178+
- type: respond
179+
with: reminder-delete.md
188180

189181
tags: [
190182
"Git","GitHub"

course-description.md

-41
This file was deleted.

0 commit comments

Comments
 (0)