@@ -14,39 +14,51 @@ before:
1414 columns :
1515 - Triage Backlog
1616 - Triage Complete
17+
1718 - type : createIssue
1819 title : Start here!
1920 body : 00_welcome-issue.md
20- action_id : welcomeIssue
21- - type : respond
22- with : 00_explain-gh-script.md
23- issue : " %actions.welcomeIssue.data.number%"
24- - type : respond
25- with : 00_octokit-comparison.md
26- issue : " %actions.welcomeIssue.data.number%"
27- - type : respond
28- issue : " %actions.welcomeIssue.data.number%"
29- with : 00_welcome-activity.md
21+ store :
22+ firstIssueUrl : " %result.data.issue.html_url%"
23+ firstIssueNumber : " %result.data.issue.number%"
3024 data :
3125 quicklink : " %payload.repository.html_url%/new/master?filename=.github/workflows/my-workflow.yml"
3226 actionsUrl : " %payload.repository.html_url%/actions/new"
27+ comments :
28+ - 00_explain-gh-script.md
29+ - 00_octokit-comparison.md
30+ - 00_welcome-activity.md
31+ # - type: respond
32+ # with: 00_explain-gh-script.md
33+ # issue: "%actions.welcomeIssue.data.number%"
34+ # - type: respond
35+ # with: 00_octokit-comparison.md
36+ # issue: "%actions.welcomeIssue.data.number%"
37+ # - type: respond
38+ # issue: "%actions.welcomeIssue.data.number%"
39+ # with: 00_welcome-activity.md
40+ # data:
41+ # quicklink: "%payload.repository.html_url%/new/master?filename=.github/workflows/my-workflow.yml"
42+ # actionsUrl: "%payload.repository.html_url%/actions/new"
3343
3444steps :
3545 - title : Setup a workflow file
3646 description : Create a pull request to add a workflow
37- event : pull_request
38- link : " {{ repoUrl }}/issues/1"
47+ event :
48+ - pull_request.opened
49+ - pull_request.edited
50+ link : " {{store.firstIssueUrl}}"
3951 actions :
40- - type : gate
41- gates :
42- # if the payload action is 'opened' OR 'edited'
43- - left : " %payload.action%"
44- operator : ===
45- right : opened
46- - left : " %payload.action%"
47- operator : ===
48- right : edited
49- # AND the pull request title equals 'Create my-workflow.yml'
52+ # - type: gate
53+ # gates:
54+ # # if the payload action is 'opened' OR 'edited'
55+ # - left: "%payload.action%"
56+ # operator: ===
57+ # right: opened
58+ # - left: "%payload.action%"
59+ # operator: ===
60+ # right: edited
61+ # # AND the pull request title equals 'Create my-workflow.yml'
5062 - type : gate
5163 left : " %payload.pull_request.title%"
5264 operator : ===
@@ -84,57 +96,64 @@ steps:
8496 with : e-wrong-file-location.md
8597 data :
8698 haveFile : " %actions.fileLocation.path%"
87- needFile : " .github/actions/cat-facts/action .yml"
99+ needFile : " .github/workflows/my-workflow .yml"
88100 editLink : " %payload.repository.html_url%/edit/%payload.pull_request.head.ref%/%actions.fileLocation.path%"
89101 fileName : my-workflow.yml
90102 # End filepath verification
91103 # ######################################################
92104 - type : respond
93- issue : Start here!
105+ issue : " {{store.firstIssueNumber}} "
94106 with : new-pull-request.md
95107 data :
96108 pullUrl : " %payload.pull_request.html_url%"
97109 - type : closeIssue
98- issue : Start here!
110+ issue : " {{store.firstIssueNumber}} "
99111 - type : createReview
100112 body : 01_merge-workflow.md
101113 event : APPROVE
114+ store :
115+ firstPullUrl : " %result.data.pull_request.html_url%"
116+ firstPullNumber : " %result.data.pull_request.number%"
102117 data :
103118 actionsUrl : " %payload.repository.html_url%/actions"
104119
105120 - title : Merge the new workflow into the master branch
106121 description : Make the workflow available for use on the repository
107122 event : pull_request.closed
108- link : " {{ repoUrl }}/pull/2 "
123+ link : " {{store.firstPullUrl}} "
109124 actions :
110125 - type : createIssue
111126 title : Create an issue comment with GitHub Script
112127 body : 02_workflow-triggered.md
113128 action_id : triggerIssue
129+ store :
130+ secondIssueNumber : " %result.data.issue.number%"
131+ secondIssueUrl : " %result.data.issue.html_url%"
114132 - type : respond
115133 with : new-issue.md
116- issue : Create my-workflow.yml
134+ issue : " %store.firstPullNumber% "
117135 data :
118- issueURL : " %actions.triggerIssue.data.html_url %"
136+ issueURL : " %store.firstPullUrl %"
119137
120138 - title : Add another GitHub Script action
121139 description : Use GitHub Script to place this issue into a project board
122- event : check_suite.completed
123- link : " {{repoUrl}}/issues/3"
140+ # event: check_suite.completed # issue_comment.created/edited
141+ event : issue_comment.created
142+ link : " {{store.secondIssueUrl}}"
124143 actions :
125144 - type : gate
126145 left : " %payload.check_suite.app.name%"
127146 operator : ===
128147 right : " GitHub Actions"
129148 else :
130149 - type : respond
131- issue : 3
150+ issue : " {{store.secondIssueNumber}} "
132151 with : debug.md
133152 data :
134153 debug : " %payload%"
135154 - type : respond
136155 with : 03_workflow-success.md
137- issue : 3
156+ issue : " {{store.secondIssueNumber}} "
138157 - type : octokit
139158 method : projects.listForRepo
140159 owner : " %payload.repository.owner.login%"
@@ -146,7 +165,7 @@ steps:
146165 action_id : listColumns
147166 - type : respond
148167 with : 03_add-to-projects.md
149- issue : 3
168+ issue : " {{store.secondIssueNumber}} "
150169 data :
151170 listProj : " %actions.projectBoard.data%"
152171 listCol : " %actions.listColumns.data%"
@@ -155,19 +174,11 @@ steps:
155174 # new pull request
156175 - title : Modify your workflow file
157176 description : Create a pull request to add changes to your workflow
158- event : pull_request
159- link : " {{ repoUrl }}/pull/4"
177+ event :
178+ - pull_request.opened
179+ - pull_request.edited
180+ link : " {{ store.secondIssueUrl }}"
160181 actions :
161- - type : gate
162- gates :
163- # if the payload action is 'opened' OR 'edited'
164- - left : " %payload.action%"
165- operator : ===
166- right : opened
167- - left : " %payload.action%"
168- operator : ===
169- right : edited
170- # AND the pull request title equals 'Create my-workflow.yml'
171182 - type : gate
172183 left : " %payload.pull_request.title%"
173184 operator : ===
@@ -211,45 +222,52 @@ steps:
211222 # End filepath verification
212223 # ######################################################
213224 - type : respond
214- issue : 3
225+ issue : " {{store.secondIssueNumber}} "
215226 with : new-pull-request.md
216227 data :
217228 pullUrl : " %payload.pull_request.html_url%"
218229 - type : closeIssue
219- issue : 3
230+ issue : " {{store.secondIssueNumber}} "
220231 - type : createReview
221232 body : 04_merge-workflow.md
222233 event : APPROVE
234+ store :
235+ secondPullNumber : " %result.data.pull_request.number%"
236+ secondPullUrl : " %result.data.pull_request.html_url%"
223237 data :
224238 actionsUrl : " %payload.repository.html_url%/actions"
225239
226240 - title : Merge the new workflow into the master branch
227241 description : Make the workflow available for use on the repository
228242 event : pull_request.closed
229- link : " {{ repoUrl }}/issues/5 "
243+ link : " {{ store.secondPullUrl }}"
230244 actions :
231245 - type : createIssue
232246 title : Create an issue comment with GitHub Script
233247 body : 05_workflow-triggered.md
234248 action_id : triggerIssue
249+ store :
250+ thirdIssueUrl : " %result.data.issue.html_url%"
251+ thirdIssueNumber : " %result.data.issue.number%"
235252 - type : respond
236253 with : new-issue.md
237- issue : Update my-workflow.yml
254+ issue : " {{store.secondPullNumber}} "
238255 data :
239- issueURL : " %actions.triggerIssue.data.html_url% "
256+ issueURL : " {{store.thirdIssueUrl}} "
240257
241258 - title : Break your workflow into multiple steps
242259 description : Separate the workflow concerns by adding more steps
243- event : check_suite.completed
244- link : " {{repoUrl}}/issues/5"
260+ # event: check_suite.completed
261+ event : issue_comment.created
262+ link : " {{thirdIssueUlr}}"
245263 actions :
246264 - type : gate
247265 left : " %payload.check_suite.app.name%"
248266 operator : ===
249267 right : " GitHub Actions"
250268 else :
251269 - type : respond
252- issue : 5
270+ issue : " {{store.thirdIssueNumber}} "
253271 with : debug.md
254272 data :
255273 debug : " %payload%"
@@ -264,12 +282,12 @@ steps:
264282 action_id : listColumns
265283 - type : respond
266284 with : 06_steps-overview.md
267- issue : 5
285+ issue : " {{store.thirdIssueNumber}} "
268286 data :
269287 projectTab : " %payload.repository.html_url%/projects/1"
270288 - type : respond
271289 with : 06_steps-activity.md
272- issue : 5
290+ issue : " {{store.thirdIssueNumber}} "
273291 data :
274292 listProj : " %actions.projectBoard.data%"
275293 listCol : " %actions.listColumns.data%"
@@ -292,12 +310,12 @@ steps:
292310 project_id : " %actions.projectBoard.data.0.id%"
293311 action_id : listColumns
294312 - type : respond
295- issue : 5
313+ issue : " {{store.thirdIssueNumber}} "
296314 with : new-pull-request.md
297315 data :
298316 pullUrl : " %payload.pull_request.html_url%"
299317 - type : closeIssue
300- issue : 5
318+ issue : " {{store.thirdIssueNumber}} "
301319 - type : respond
302320 with : 07_explain-node.md
303321 - type : respond
0 commit comments