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

Commit 380126d

Browse files
committed
more store testing
1 parent 115ac1d commit 380126d

File tree

2 files changed

+37
-45
lines changed

2 files changed

+37
-45
lines changed

config.yml

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,19 @@ before:
1414
columns:
1515
- Triage Backlog
1616
- Triage Complete
17-
1817
- type: createIssue
1918
title: Start here!
2019
body: 00_welcome-issue.md
2120
store:
2221
welcomeIssueUrl: "%result.data.html_url%"
2322
welcomeIssueNumber: "%result.data.number%"
24-
# createIssueResult: "%result.data%"
2523
data:
2624
quicklink: "%payload.repository.html_url%/new/master?filename=.github/workflows/my-workflow.yml"
2725
actionsUrl: "%payload.repository.html_url%/actions/new"
2826
comments:
2927
- 00_explain-gh-script.md
3028
- 00_octokit-comparison.md
3129
- 00_welcome-activity.md
32-
# - e-result.md
33-
# - type: respond
34-
# with: 00_explain-gh-script.md
35-
# issue: "%actions.welcomeIssue.data.number%"
36-
# - type: respond
37-
# with: 00_octokit-comparison.md
38-
# issue: "%actions.welcomeIssue.data.number%"
39-
# - type: respond
40-
# issue: "%actions.welcomeIssue.data.number%"
41-
# with: 00_welcome-activity.md
42-
# data:
43-
# quicklink: "%payload.repository.html_url%/new/master?filename=.github/workflows/my-workflow.yml"
44-
# actionsUrl: "%payload.repository.html_url%/actions/new"
4530

4631
steps:
4732
- title: Setup a workflow file
@@ -68,26 +53,32 @@ steps:
6853
# Validate the filepath for the my-workflow.yml file
6954
# get tree
7055
- type: getTree
71-
action_id: isInTree
56+
# action_id: isInTree
57+
store:
58+
firstWorkflowTree: "%result.data.tree%"
7259
recursive: true
7360
sha: "%payload.pull_request.head.sha%"
7461
# check for a file in a tree
7562
- type: gate
76-
left: "%actions.isInTree.data.tree%"
63+
# left: "%actions.isInTree.data.tree%"
64+
left: "%registration.store.firstWorkflowTree%"
7765
operator: includes
7866
right: "path:.github/workflows/my-workflow.yml"
7967
else:
8068
# if file isn't where expected find true location
8169
- type: findInTree
8270
path: my-workflow.yml
83-
tree: "%actions.isInTree.data.tree%"
84-
# multiple: true
85-
action_id: fileLocation
71+
# tree: "%actions.isInTree.data.tree%"
72+
tree: "%registration.store.firstWorkflowTree%"
73+
# action_id: fileLocation
74+
store:
75+
firstFileLocation: "%result.data.path%"
8676
# help user with proper file location
8777
- type: respond
8878
with: e-wrong-file-location.md
8979
data:
90-
haveFile: "%actions.fileLocation.path%"
80+
# haveFile: "%actions.fileLocation.path%"
81+
haveFile: "%registration.store.firstFileLocation%"
9182
needFile: ".github/workflows/my-workflow.yml"
9283
editLink: "%payload.repository.html_url%/edit/%payload.pull_request.head.ref%/%actions.fileLocation.path%"
9384
fileName: my-workflow.yml
@@ -99,7 +90,7 @@ steps:
9990
data:
10091
pullUrl: "%payload.pull_request.html_url%"
10192
- type: closeIssue
102-
issue: "{{store.welcomeIssueNumber}}"
93+
issue: "%registration.store.welcomeIssueNumber%"
10394
- type: createReview
10495
body: 01_merge-workflow.md
10596
event: APPROVE
@@ -117,15 +108,15 @@ steps:
117108
- type: createIssue
118109
title: Create an issue comment with GitHub Script
119110
body: 02_workflow-triggered.md
120-
action_id: triggerIssue
111+
# action_id: triggerIssue
121112
store:
122113
secondIssueNumber: "%result.data.number%"
123114
secondIssueUrl: "%result.data.html_url%"
124115
- type: respond
125116
with: new-issue.md
126-
issue: "%store.firstPullNumber%"
117+
issue: "%registration.store.firstPullNumber%"
127118
data:
128-
issueURL: "%store.firstPullUrl%"
119+
issueURL: "%registration.store.firstPullUrl%"
129120

130121
- title: Add another GitHub Script action
131122
description: Use GitHub Script to place this issue into a project board
@@ -139,29 +130,33 @@ steps:
139130
right: "GitHub Actions"
140131
else:
141132
- type: respond
142-
issue: "{{store.secondIssueNumber}}"
133+
issue: "%registration.store.secondIssueNumber%"
143134
with: debug.md
144135
data:
145136
debug: "%payload%"
146137
- type: respond
147138
with: 03_workflow-success.md
148-
issue: "{{store.secondIssueNumber}}"
139+
issue: "%registration.store.secondIssueNumber%"
149140
- type: octokit
150141
method: projects.listForRepo
151142
owner: "%payload.repository.owner.login%"
152143
repo: "%payload.repository.name%"
153-
action_id: projectBoard
144+
# action_id: projectBoard
145+
store:
146+
projectBoard: "%result.data.0.id%"
154147
- type: octokit
155148
method: projects.listColumns
156-
project_id: "%actions.projectBoard.data.0.id%"
149+
# project_id: "%actions.projectBoard.data.0.id%"
150+
project_id: "%registration.store.projectBoard%"
157151
action_id: listColumns
152+
store:
153+
listColumns: "%result.data.0.id"
158154
- type: respond
159155
with: 03_add-to-projects.md
160-
issue: "{{store.secondIssueNumber}}"
156+
issue: "%registration.store.secondIssueNumber%"
161157
data:
162-
listProj: "%actions.projectBoard.data%"
163-
listCol: "%actions.listColumns.data%"
164-
columnID: "%actions.listColumns.data.0.id%"
158+
# columnID: "%actions.listColumns.data.0.id%"
159+
columnID: "%registration.store.listColumns%"
165160
quicklink: "%payload.repository.html_url%/edit/master/.github/workflows/my-workflow.yml"
166161
# new pull request
167162
- title: Modify your workflow file
@@ -214,12 +209,12 @@ steps:
214209
# End filepath verification
215210
#######################################################
216211
- type: respond
217-
issue: "{{store.secondIssueNumber}}"
212+
issue: "%registration.store.secondIssueNumber%"
218213
with: new-pull-request.md
219214
data:
220215
pullUrl: "%payload.pull_request.html_url%"
221216
- type: closeIssue
222-
issue: "{{store.secondIssueNumber}}"
217+
issue: "%registration.store.secondIssueNumber%"
223218
- type: createReview
224219
body: 04_merge-workflow.md
225220
event: APPROVE
@@ -243,9 +238,9 @@ steps:
243238
thirdIssueNumber: "%result.data.number%"
244239
- type: respond
245240
with: new-issue.md
246-
issue: "{{store.secondPullNumber}}"
241+
issue: "%registration.store.secondPullNumber%"
247242
data:
248-
issueURL: "{{store.thirdIssueUrl}}"
243+
issueURL: "%registration.store.thirdIssueUrl%"
249244

250245
- title: Break your workflow into multiple steps
251246
description: Separate the workflow concerns by adding more steps
@@ -259,7 +254,7 @@ steps:
259254
right: "GitHub Actions"
260255
else:
261256
- type: respond
262-
issue: "{{store.thirdIssueNumber}}"
257+
issue: "%registration.store.thirdIssueNumber%"
263258
with: debug.md
264259
data:
265260
debug: "%payload%"
@@ -274,12 +269,12 @@ steps:
274269
action_id: listColumns
275270
- type: respond
276271
with: 06_steps-overview.md
277-
issue: "{{store.thirdIssueNumber}}"
272+
issue: "%registration.store.thirdIssueNumber%"
278273
data:
279274
projectTab: "%payload.repository.html_url%/projects/1"
280275
- type: respond
281276
with: 06_steps-activity.md
282-
issue: "{{store.thirdIssueNumber}}"
277+
issue: "%registration.store.thirdIssueNumber%"
283278
data:
284279
listProj: "%actions.projectBoard.data%"
285280
listCol: "%actions.listColumns.data%"
@@ -302,12 +297,12 @@ steps:
302297
project_id: "%actions.projectBoard.data.0.id%"
303298
action_id: listColumns
304299
- type: respond
305-
issue: "{{store.thirdIssueNumber}}"
300+
issue: "%registration.store.thirdIssueNumber%"
306301
with: new-pull-request.md
307302
data:
308303
pullUrl: "%payload.pull_request.html_url%"
309304
- type: closeIssue
310-
issue: "{{store.thirdIssueNumber}}"
305+
issue: "%registration.store.thirdIssueNumber%"
311306
- type: respond
312307
with: 07_explain-node.md
313308
- type: respond

responses/e-result.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)