-
Notifications
You must be signed in to change notification settings - Fork 22
557 lines (416 loc) · 21.9 KB
/
gitTest.yml
File metadata and controls
557 lines (416 loc) · 21.9 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
name: Git Test
on:
repository_dispatch:
types:
[test_pr]
jobs:
runTests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
- name: Install octokit/core.js
run: npm install @octokit/core
- name: Install xmlhttprequest
run: npm install xmlhttprequest
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '>=3.7'
- name: Setup Git environment
run: |
git config --global user.email "byucomputingbootcamptests@gmail.com"
git config --global user.name "BYU Computing Bootcamp Tests"
- name: Setup SSH in case SSH is used
uses: MrSquaare/ssh-setup-action@v1
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
#Get Repository that isn't currently being checked
- name: Get a Pull Request's Repo Name that isn't already being checked
run: node .cbc/getRepoInfo.js ${{ secrets.AUTH_TOKEN }} full_name > repo.txt
- name: Save Repository name as Output Variable
id: repo
uses: juliangruber/read-file-action@v1
with:
path: repo.txt
- name: Get the Pull Request's Number
run: node .cbc/getRepoInfo.js ${{ secrets.AUTH_TOKEN }} number > number.txt
- name: Save Repository Number as Output Variable
id: number
uses: juliangruber/read-file-action@v1
with:
path: number.txt
- name: Add "currentlyBeingChecked" label
run: node .cbc/addLabel.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} currentlyBeingChecked
#INSERT TESTING CODE HERE!
#Problem 1 Testing
- name: Get gitScript for problem 1
id: getScript1
run: node .cbc/getFile.js ${{ secrets.AUTH_TOKEN }} ${{ steps.repo.outputs.content }} gitScript1.sh > gitScript
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "gitScript1.sh found"
- name: Check for "git init"
id: gitInit1
run: node .cbc/assertContains.js gitScript "git init"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git init found"
- name: Check for "git add"
id: gitAdd1
run: node .cbc/assertContains.js gitScript "git add"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git add found"
- name: Check for "git commit"
id: gitCommit1
run: node .cbc/assertContains.js gitScript "git commit"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git commit found"
- name: Check for "git checkout"
id: gitCheckout1
run: node .cbc/assertContains.js gitScript "git checkout"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git checkout found"
- name: Check for "git merge"
id: gitMerge1
run: node .cbc/assertContains.js gitScript "git merge"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git merge found"
- name: Run gitScripts1.sh
id: runScript1
run: |
cd repo1
source ../gitScript
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "First gitScript run"
- name: Get output
id: checkRepo1
run: |
cd repo1
python git_check.py > output.txt
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Python run"
- name: Get output file
id: getOutput1
uses: juliangruber/read-file-action@v1
with:
path: repo1/output.txt
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Got Python output"
- name: Assert Proper Output
id: properOutput
uses: therussiankid92/gat@v1.5
with:
assertion: should.equal
actual: ${{ steps.getOutput1.outputs.content }}
expected: ${{ secrets.GIT_CHECK_OUTPUT }}
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Python output is correct"
- name: Get branch names
id: getBranchNames
run: |
cd repo1
git branch > ../branch.txt
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Got branch names"
- name: Get branch name text
id: getBranch
uses: juliangruber/read-file-action@v1
with:
path: branch.txt
- name: Check for "main"
id: mainBranch
run: node .cbc/assertContains.js branch.txt "main"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "main found"
- name: Check for "branch1"
id: branch1Branch
run: node .cbc/assertContains.js branch.txt "branch1"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "branch1 found"
- name: Get commit message
id: getCommitMsg
uses: juliangruber/read-file-action@v1
with:
path: repo1/.git/COMMIT_EDITMSG
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Get commit message"
- name: Check for commit message
id: checkCommitMsg
run: node .cbc/assertContains.js gitScript ${{ steps.getCommitMsg.outputs.content }}
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Commit message found"
- name: Get main logs
id: mainLog
run: cat repo1/.git/logs/refs/heads/main > mainLog
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Got main logs"
- name: Get branch1 logs
id: branch1Log
run: cat repo1/.git/logs/refs/heads/branch1 > branch1Log
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Got branch1 logs"
- name: Check "Created from main"
id: branchLogcheck1
run: node .cbc/assertContains.js branch1Log "Created from main"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Created from found"
- name: Check "commit" on branch
id: branchLogcheck2
run: node .cbc/assertContains.js branch1Log "commit"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "commit found on branch"
- name: Check "commit" on main
id: mainLogcheck1
run: node .cbc/assertContains.js mainLog "commit"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "commit found on main"
- name: Check "renamed"
id: mainLogcheck2
run: node .cbc/assertContains.js mainLog "renamed"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "renamed found on main"
- name: Check "merge"
id: mainLogcheck3
run: node .cbc/assertContains.js mainLog "merge"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "merge found on main"
#Problem 2 Testing
- name: Get gitScript for problem 2
id: getScript2
run: node .cbc/getFile.js ${{ secrets.AUTH_TOKEN }} ${{ steps.repo.outputs.content }} gitScript2.sh > gitScript
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "gitScript2.sh found"
- name: Check for "git clone"
id: gitClone2
run: node .cbc/assertContains.js gitScript "git clone"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git clone found"
- name: Check for "git log"
id: gitLog2
run: node .cbc/assertContains.js gitScript "git log"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git log found"
- name: Check for "git diff"
id: gitDiff2
run: node .cbc/assertContains.js gitScript "git diff"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git diff found"
- name: Check for "git checkout"
id: gitCheckout2
run: node .cbc/assertContains.js gitScript "git checkout"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git checkout found"
- name: Check for "git commit"
id: gitCommit2
run: node .cbc/assertContains.js gitScript "git commit"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "git commit found"
- name: Check for first hash
id: gitHash1
run: node .cbc/assertContains.js gitScript "e4c1d"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "First hash found"
- name: Check for second hash
id: gitHash2
run: node .cbc/assertContains.js gitScript "b1cab"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Second hash found"
- name: Run gitScripts1.sh
id: runScript2
run: |
cd repo2
source ../gitScript
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Second gitScript run"
- name: Run main.py
id: runMain
run: |
cd repo2/git-clone
echo -e "0\n1\n2\n3\n" > answers
python3 main.py < answers > output.txt
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Python run"
- name: Check for "You guessed it!"
id: checkPyOut
run: node .cbc/assertContains.js repo2/git-clone/output.txt "You guessed it!"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Python output correct"
- name: Get commit message
id: getCommitMsg2
uses: juliangruber/read-file-action@v1
with:
path: repo2/git-clone/.git/COMMIT_EDITMSG
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Get commit message 2"
- name: Check for commit history
id: commitHistory
run: |
cd repo2/git-clone
git log > gitlog.txt
cat gitlog.txt
node ../../.cbc/assertContains.js gitlog.txt ${{ steps.getCommitMsg2.outputs.content }}
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Commit history accurate"
- name: Check for update line
id: doorCheck
run: node .cbc/assertContains.js repo2/git-clone/door.py "if not self.locked"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Door.py accurate"
- name: Check for update line
id: keyCheck
run: node .cbc/assertContains.js repo2/git-clone/key.py "toothed"
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Key.py accurate"
#Issue Badge
- name: Get email.txt
id: getEmail
run: node .cbc/getFile.js ${{ secrets.AUTH_TOKEN }} ${{ steps.repo.outputs.content }} email.txt > email.txt
- name: Save Email as Output Variable
id: userEmail
uses: juliangruber/read-file-action@v1
with:
path: email.txt
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Email found - ${{ steps.userEmail.outputs.content }}"
- name: Issue Badge
id: issueBadge
run: node .cbc/badgeAPI.js ${{secrets.USERNAME}} ${{secrets.PASSWORD}} ${{ steps.userEmail.outputs.content }}
- name: Comment
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Badge Issued. Congratulations!"
#INSERT FAILURE COMMENTS HERE
#Problem 1 Failures
- name: Failure Comment
if: always() && steps.getScript1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - gitScript1.sh not found"
- name: Failure Comment
if: always() && steps.gitInit1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript1"
- name: Failure Comment
if: always() && steps.gitAdd1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript1"
- name: Failure Comment
if: always() && steps.gitCommit1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript1"
- name: Failure Comment
if: always() && steps.gitCheckout1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript1"
- name: Failure Comment
if: always() && steps.gitMerge1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript1"
- name: Failure Comment
if: always() && steps.runScript1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - gitScript1 failed"
- name: Failure Comment
if: always() && steps.checkRepo1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - git_check broken"
- name: Failure Comment
if: always() && steps.getOutput1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - couldn't read output file"
- name: Failure Comment
if: always() && steps.properOutput.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - python output incorrect"
- name: Failure Comment
if: always() && steps.getBranchNames.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - couldn't get branch names"
- name: Failure Comment
if: always() && steps.getBranch.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - couldn't get branch text"
- name: Failure Comment
if: always() && steps.mainBranch.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - main branch does not exist"
- name: Failure Comment
if: always() && steps.branch1Branch.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - branch1 does not exist"
- name: Failure Comment
if: always() && steps.getCommitMsg.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - could not get commit message"
- name: Failure Comment
if: always() && steps.checkCommitMsg.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commit message missing"
- name: Failure Comment
if: always() && steps.mainLog.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - main log not found"
- name: Failure Comment
if: always() && steps.branch1Log.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - branch1 log not found"
- name: Failure Comment
if: always() && steps.branchLogcheck1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - branch1 missing key features"
- name: Failure Comment
if: always() && steps.branchLogcheck2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - branch1 missing key features"
- name: Failure Comment
if: always() && steps.mainLogcheck1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - main branch missing key features"
- name: Failure Comment
if: always() && steps.mainLogcheck2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - main branch missing key features"
- name: Failure Comment
if: always() && steps.mainLogcheck3.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - main branch missing key features"
#Problem 2 Failures
- name: Failure Comment
if: always() && steps.getScript2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - gitScript2.sh not found"
- name: Failure Comment
if: always() && steps.gitClone2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitLog2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitDiff2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitCheckout2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitCommit2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commands missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitHash1.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - hash names missing from gitScript2"
- name: Failure Comment
if: always() && steps.gitHash2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - hash names missing from gitScript2"
- name: Failure Comment
if: always() && steps.runScript2.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - error with bash script"
- name: Failure Comment
if: always() && steps.runMain.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - error with python"
- name: Failure Comment
if: always() && steps.checkPyOut.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - error with python output"
- name: Failure Comment
if: always() && steps.commitHistory.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - commit history incorrect"
- name: Failure Comment
if: always() && steps.doorCheck.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - door code incorrect"
- name: Failure Comment
if: always() && steps.keyCheck.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - key code incorrect"
#Failure Output for Issue Badge
- name: Failure Comment
if: always() && steps.getEmail.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - No email.txt found"
- name: Failure Comment
if: always() && steps.issueBadge.outcome == 'failure'
run: node .cbc/makeComment.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} "Error - Badge issue failed - Email Address wasn't valid"
#Close Pull Request
- name: Close Pull Request
if: always()
uses: peter-evans/close-pull@v1
with:
pull-request-number: ${{ steps.number.outputs.content }}
comment: Auto-closing pull request after submission
delete-branch: false
- name: Remove Previous Labels
if: always()
run: node .cbc/removeAllLabels.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }}
- name: Add "checkComplete" label
if: always()
run: node .cbc/addLabel.js ${{ secrets.AUTH_TOKEN }} ${{ steps.number.outputs.content }} checkComplete