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

Commit 1899c90

Browse files
committed
add more dynamic values to config
1 parent 19c3ac5 commit 1899c90

File tree

1 file changed

+43
-24
lines changed

1 file changed

+43
-24
lines changed

config.yml

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,16 @@ steps:
4646
store:
4747
firstPullNumber: "%payload.pull_request.number%"
4848
firstPullUrl: "%payload.pull_request.html_url%"
49+
operator: ===
50+
right: Create my-workflow.yml
4951

50-
# operator: ===
51-
# right: Create my-workflow.yml
52-
53-
# # if those statments FAIL... do this
54-
# else:
55-
# - type: respond
56-
# with: e-rename-pr.md
57-
# data:
58-
# title: Create my-workflow.yml
59-
# if those gates === true Then do this stuff
52+
# if those statments FAIL... do this
53+
else:
54+
- type: respond
55+
with: e-rename-pr.md
56+
data:
57+
title: Create my-workflow.yml
58+
if those gates === true Then do this stuff
6059
#######################################################
6160
# Validate the filepath for the my-workflow.yml file
6261
# get tree
@@ -168,10 +167,11 @@ steps:
168167
actions:
169168
- type: gate
170169
store:
171-
secondPullNumber: "%result.data.number%"
172-
secondPullUrl: "%result.data.html_url%"
170+
secondPullNumber: "%payload.pull_request.number%"
171+
secondPullUrl: "%payload.pull_request.html_url%"
173172
left: "%payload.pull_request.title%"
174173
operator: ===
174+
175175
right: Update my-workflow.yml
176176

177177
# if those statments FAIL... do this
@@ -180,8 +180,7 @@ steps:
180180
with: e-rename-pr.md
181181
data:
182182
title: Update my-workflow.yml
183-
# if those gates === true Then do this stuff
184-
183+
# if those gates === true Then do this stuff
185184
#######################################################
186185
# Validate the filepath for the my-workflow.yml file
187186
# get tree
@@ -290,8 +289,13 @@ steps:
290289
event:
291290
- pull_request.opened
292291
- pull_request.edited
293-
link: "{{repoUrl}}/pull/6"
292+
link: "{{store.thirdIssueUrl}}"
294293
actions:
294+
- type: gate
295+
store:
296+
thirdPullNumber: "%payload.pull_request.number%"
297+
thirdPullUrl: "%payload.pull_request.html_url%"
298+
left: "%payload.pull_request.title%"
295299
- type: octokit
296300
method: projects.listForRepo
297301
owner: "%payload.repository.owner.login%"
@@ -305,7 +309,7 @@ steps:
305309
issue: "%registration.store.thirdIssueNumber%"
306310
with: new-pull-request.md
307311
data:
308-
pullUrl: "%payload.pull_request.html_url%"
312+
pullUrl: "%registration.store.thirdPullUrl%"
309313
- type: closeIssue
310314
issue: "%registration.store.thirdIssueNumber%"
311315
- type: respond
@@ -319,7 +323,7 @@ steps:
319323
- title: Merge the final workflow
320324
description: Merge the final workflow into the repository
321325
event: pull_request.synchronize
322-
link: "{{repoUrl}}/pull/6"
326+
link: "{{store.thirdPullUrl}}"
323327
actions:
324328
- type: createReview
325329
body: 08_merge-workflow.md
@@ -328,7 +332,7 @@ steps:
328332
- title: See workflow results
329333
description: See the results of the final workflow run
330334
event: pull_request.closed
331-
link: "{{repoUrl}}/issue/7"
335+
link: "{{store.thirdPullUrl}}"
332336
actions:
333337
- type: octokit
334338
action_id: triggerIssue
@@ -345,24 +349,39 @@ steps:
345349
346350
I'll respond here once it has completed!
347351
labels: ["bug"]
352+
store:
353+
fourthIssueUrl: "%result.data.html_url%"
354+
fourthIssueNumber: "%result.data.number%"
348355

349356
- type: respond
350357
with: new-issue.md
351-
issue: 6
358+
issue: "%registration.store.thirdPullNumber%"
352359
data:
353-
issueURL: "%actions.triggerIssue.data.html_url%"
360+
# issueURL: "%actions.triggerIssue.data.html_url%"
361+
issueURL: "%registration.store.fourthIssueUrl%"
354362

355363
- title: Open an issue
356364
description: Open another issue that does not contain the bug tag
357-
event: check_suite.completed
358-
link: "{{repoUrl}}/issue/7"
365+
# event: check_suite.completed
366+
event: issue_comment.created
367+
link: "{{store.fourthIssueUrl}}"
359368
actions:
369+
- type: gate
370+
left: "%payload.comment.user.login%"
371+
operator: ===
372+
right: "github-actions[bot]"
373+
else:
374+
- type: respond
375+
issue: "%registration.store.fourthIssueNumber%"
376+
with: debug.md
377+
data:
378+
debug: "%payload%"
360379
- type: respond
361380
with: 09_workflow-completed.md
362-
issue: 7
381+
issue: "%registration.store.fourthIssueNumber%"
363382
- type: respond
364383
with: 09_issue-activity.md
365-
issue: 7
384+
issue: "%registration.store.fourthIssueNumber%"
366385
data:
367386
quicklink: "%payload.repository.html_url%/issues/new"
368387

0 commit comments

Comments
 (0)