@@ -26,6 +26,15 @@ template:
2626# 4. (PR) Learner created PR, "Add issues to project board" possibly
2727# secondPullNumber
2828# secondPullUrl
29+ # 5. (Issue) Comment and triage with GitHub Script
30+ # thirdIssueUrl
31+ # thirdIssueNumber
32+ # 6. (PR) Learner created PR, "Create better comments" possibly
33+ # thirdPullNumber
34+ # thirdPullUrl
35+ # 7. (Issue) It's alive!
36+ # fourthIssueUrl
37+ # fourthIssueNumber
2938
3039before :
3140 - type : updateBranchProtection
@@ -228,6 +237,18 @@ steps:
228237 event : pull_request.closed
229238 link : " {{ store.secondPullUrl }}"
230239 actions :
240+ - type : gate
241+ every : true
242+ gates :
243+ - left : ' {{ payload.pull_request.number }}'
244+ operator : ===
245+ right : ' {{ store.secondPullNumber }}'
246+ - left : ' {{ payload.pull_request.merged }}'
247+ else :
248+ - type : respond
249+ with : e-generic.md
250+ data :
251+ expected : merge pull request '{{ store.secondPullNumber }}'
231252 - type : createIssue
232253 title : Comment and triage with GitHub Script
233254 body : 05_workflow-triggered.md
@@ -287,24 +308,14 @@ steps:
287308 - pull_request.edited
288309 link : " {{store.thirdPullUrl}}"
289310 actions :
290- - type : gate
291- store :
292- thirdPullNumber : " %payload.pull_request.number%"
293- thirdPullUrl : " %payload.pull_request.html_url%"
294- left : " %payload.pull_request.title%"
295- operator : ===
296- right : Create better comments
297- # if those statments FAIL... do this
298- else :
299- - type : respond
300- with : e-rename-pr.md
301- data :
302- title : Create better comments
303311 - type : octokit
304312 method : projects.listForRepo
305313 owner : " %payload.repository.owner.login%"
306314 repo : " %payload.repository.name%"
307315 action_id : projectBoard
316+ store :
317+ thirdPullNumber : " %payload.pull_request.number%"
318+ thirdPullUrl : " %payload.pull_request.html_url%"
308319 - type : octokit
309320 method : projects.listColumns
310321 project_id : " %actions.projectBoard.data.0.id%"
@@ -329,6 +340,15 @@ steps:
329340 event : pull_request.synchronize
330341 link : " {{store.thirdPullUrl}}"
331342 actions :
343+ - type : gate
344+ left : ' {{ payload.pull_request.number }}'
345+ operator : ===
346+ right : ' {{ store.thirdPullNumber }}'
347+ else :
348+ - type : respond
349+ with : e-generic.md
350+ data :
351+ expected : push a commit to '{{ store.thirdPullNumber }}'
332352 - type : createReview
333353 body : 08_merge-workflow.md
334354 event : APPROVE
@@ -338,6 +358,18 @@ steps:
338358 event : pull_request.closed
339359 link : " {{store.thirdPullUrl}}"
340360 actions :
361+ - type : gate
362+ every : true
363+ gates :
364+ - left : ' {{ payload.pull_request.number }}'
365+ operator : ===
366+ right : ' {{ store.thirdPullNumber }}'
367+ - left : ' {{ payload.pull_request.merged }}'
368+ else :
369+ - type : respond
370+ with : e-generic.md
371+ data :
372+ expected : merge pull request '{{ store.thirdPullNumber }}'
341373 - type : octokit
342374 action_id : triggerIssue
343375 method : issues.create
0 commit comments