forked from githubtraining/introduction-to-github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
161 lines (161 loc) · 4.78 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
title: P2P Hack Club's Introduction to GitHub
description: P2P Hack Club's quick and fun introduction to GitHub. 100% dino approved.
template:
name: orpheus's-science-project
repo: introduction-to-github-template
description: Dino + Science = Dino-mite
before:
- type: updateBranchProtection
- type: createIssue
title: Getting Started with GitHub
body: 00_introduction.md
comments:
- 00_assign-yourself.md
steps:
- title: Assign yourself
description: Assign the first issue to yourself.
event: issues.assigned
link: '{{ repoUrl }}/issues/1'
actions:
- type: gate
left: '%payload.assignee.login%'
operator: ===
right: '%user.username%'
- type: respond
with: 01_turn-on-gh-pages.md
- title: Turn on GitHub Pages
description: Turn on GitHub Pages in the settings page of the repository.
event: page_build
link: '{{ repoUrl }}/issues/1'
actions:
- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
store:
pagesUrl: '{{ result.data.html_url }}'
action_id: pagesUrl
- type: respond
issue: Getting Started with GitHub
with: 02_close-issue.md
- title: Close an issue
description: Cease a conversation by closing an issue.
event: issues.closed
link: '{{ repoUrl }}/issues/1'
actions:
- type: createIssue
action_id: contrib_issue
title: Your first contribution
body: 03_your-first-contribution.md
comments:
- 03_create-a-branch.md
data:
thePayload: '%payload%'
- type: respond
with: 03_head-to-branch.md
data:
issueURL: '%actions.contrib_issue.data.html_url%'
- title: Create a branch
description: Create a branch for introducing new changes.
event: create
link: '{{ repoUrl }}/issues/2'
actions:
- type: respond
issue: Your first contribution
with: 04_commit-something.md
data:
thePayload: '%payload%'
- title: Commit a file
description: Commit your file to the branch.
event: push
link: '{{ repoUrl }}/issues/2'
actions:
- type: respond
issue: Your first contribution
with: 05_open-a-pr.md
data:
branch: '%payload.ref%'
url: '%payload.repository.html_url%/compare/%payload.ref%?expand=1'
- title: Open a pull request
description: Open a pull request to propose your new file to the codebase.
event: pull_request
link: '{{ repoUrl }}/issues/2'
actions:
- type: gate
gates:
- left: '%payload.action%'
operator: ===
right: opened
- left: '%payload.action%'
operator: ===
right: edited
- left: '%payload.action%'
operator: ===
right: synchronize
- type: closeIssue
issue: Your first contribution
- type: gate
left: '%payload.pull_request.body%'
else:
- type: createReview
body: 06_fix-body.md
event: REQUEST_CHANGES
- type: gate
left: '%payload.pull_request.base.ref%'
operator: ===
right: main
else:
- type: createReview
body: 06_fix-base.md
event: REQUEST_CHANGES
- type: getTree
action_id: tree
recursive: true
sha: '%payload.pull_request.head.sha%'
- type: gate
left: '%actions.tree.data.tree%'
operator: includes
right: 'path:/info.html/'
else:
- type: createReview
body: 06_fix-filename.md
event: REQUEST_CHANGES
data:
expected: info.html
url: '%payload.pull_request.html_url%/files'
- type: createReview
body: 06_request-changes.md
event: COMMENT
data:
branch: '%payload.pull_request.head.ref%'
url: '%payload.pull_request.html_url%/files'
- title: Respond to a review
description: Respond to a PR review.
event: pull_request.synchronize
link: '{{ repoUrl }}/pull/3'
actions:
- type: removeBranchProtection
- type: createReview
body: 07_pr-succeeds.md
event: APPROVE
data:
branch: '%payload.pull_request.head.ref%'
- title: Merge your pull request
description: Make your changes live by merging your PR.
event: pull_request.closed
link: '{{ repoUrl }}/pull/3'
actions:
- type: gate
left: '%payload.pull_request.merged%'
else:
- type: respond
with: 08_reopen.md
- type: respond
with: 08_reminder-delete.md
tags:
- Git
- GitHub Pages
- Branches
- Commits
- Pull Requests
video: sz6zfrQpCQg