forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-Git_Integration-Test.yml
1533 lines (1533 loc) · 32.4 KB
/
playbook-Git_Integration-Test.yml
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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
id: Git_Integration-Test
version: -1
name: Git_Integration-Test
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: af7b0f17-eafd-4d8b-8d9e-e3c9ef6a9b82
type: start
task:
id: af7b0f17-eafd-4d8b-8d9e-e3c9ef6a9b82
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "1"
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 50
}
}
note: false
timertriggers: []
ignoreworker: false
"1":
id: "1"
taskid: 474da64a-2586-4a03-8a18-b1715f569c43
type: regular
task:
id: 474da64a-2586-4a03-8a18-b1715f569c43
version: -1
name: DeleteContext
description: Delete field from context
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "16"
- "21"
- "26"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 195
}
}
note: false
timertriggers: []
ignoreworker: false
"3":
id: "3"
taskid: b5600231-52ca-405e-8760-54daffabe855
type: condition
task:
id: b5600231-52ca-405e-8760-54daffabe855
version: -1
name: Verify Results - create
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "17"
- "18"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.Title
iscontext: true
right:
value:
simple: '"new issue"'
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.Repository
iscontext: true
right:
value:
simple: hello-world
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.State
iscontext: true
right:
value:
simple: open
view: |-
{
"position": {
"x": 592.5,
"y": 1070
}
}
note: false
timertriggers: []
ignoreworker: false
"7":
id: "7"
taskid: 3c65a319-44b8-40ba-8c65-11d2058b1934
type: condition
task:
id: 3c65a319-44b8-40ba-8c65-11d2058b1934
version: -1
name: Verify Results - search
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "19"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: containsGeneral
left:
value:
simple: GitHub.Issue.Repository
iscontext: true
right:
value:
simple: hello-world
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.Title
iscontext: true
right:
value:
simple: '"new issue"'
- - operator: containsGeneral
left:
value:
simple: GitHub.Issue.ID
iscontext: true
right:
value:
simple: ID
iscontext: true
view: |-
{
"position": {
"x": 377.5,
"y": 1420
}
}
note: false
timertriggers: []
ignoreworker: false
"10":
id: "10"
taskid: f7427f05-d477-4520-805e-9aee51ddd85b
type: condition
task:
id: f7427f05-d477-4520-805e-9aee51ddd85b
version: -1
name: Verify Results - list all
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "47"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: containsGeneral
left:
value:
simple: GitHub.Issue.Repository
iscontext: true
right:
value:
simple: hello-world
- - operator: containsGeneral
left:
value:
simple: GitHub.Issue.ID
iscontext: true
right:
value:
simple: ID
iscontext: true
view: |-
{
"position": {
"x": 592.5,
"y": 1770
}
}
note: false
timertriggers: []
ignoreworker: false
"15":
id: "15"
taskid: e1320397-ba03-42eb-8fd3-f6d46acee1ac
type: title
task:
id: e1320397-ba03-42eb-8fd3-f6d46acee1ac
version: -1
name: Done
description: Done
type: title
iscommand: false
brand: Builtin
separatecontext: false
view: |-
{
"position": {
"x": 807.5,
"y": 3695
}
}
note: false
timertriggers: []
ignoreworker: false
"16":
id: "16"
taskid: adfdffbc-f47b-4658-813f-562b8c9ccf4b
type: regular
task:
id: adfdffbc-f47b-4658-813f-562b8c9ccf4b
version: -1
name: GitHub-create-issue
description: Creates an issue in GitHub.
script: '|||GitHub-create-issue'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "25"
scriptarguments:
assignees: {}
body: {}
labels:
simple: newbug
title:
simple: '"new issue"'
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 720
}
}
note: false
timertriggers: []
ignoreworker: false
"17":
id: "17"
taskid: e5471b9b-bbbc-4e56-86e8-028bda080192
type: regular
task:
id: e5471b9b-bbbc-4e56-86e8-028bda080192
version: -1
name: GitHub-search-issues
description: Searches issues matching a given query
script: '|||GitHub-search-issues'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "7"
scriptarguments:
limit: {}
query:
simple: '"user:content-bot label:newbug"'
separatecontext: false
view: |-
{
"position": {
"x": 377.5,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
"18":
id: "18"
taskid: 05dfc533-aaff-4765-88eb-0d883b5d5747
type: regular
task:
id: 05dfc533-aaff-4765-88eb-0d883b5d5747
version: -1
name: GitHub-update-issue
description: Updates the parameters of a given issue
script: '|||GitHub-update-issue'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "23"
scriptarguments:
ID:
simple: ${GitHub.Issue.ID}
assignees: {}
body:
simple: '"new information"'
labels: {}
state: {}
title: {}
separatecontext: false
view: |-
{
"position": {
"x": 807.5,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
"19":
id: "19"
taskid: 232e6ce1-ab24-4f76-8cd9-d1f24a2be755
type: regular
task:
id: 232e6ce1-ab24-4f76-8cd9-d1f24a2be755
version: -1
name: GitHub-list-all-issues
description: Lists all issues that the user can see
script: '|||GitHub-list-all-issues'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "10"
scriptarguments:
limit: {}
state:
simple: open
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 1595
}
}
note: false
timertriggers: []
ignoreworker: false
"20":
id: "20"
taskid: 6b82bf2f-5854-4c60-8d51-4183304564eb
type: regular
task:
id: 6b82bf2f-5854-4c60-8d51-4183304564eb
version: -1
name: GitHub-close-issue
description: closes an existing issue
script: '|||GitHub-close-issue'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "24"
scriptarguments:
ID:
complex:
root: IssueID
filters:
- - operator: isNotEqualNumber
left:
value:
simple: IssueID
iscontext: true
right:
value:
simple: "1"
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 2120
}
}
note: false
timertriggers: []
ignoreworker: false
"21":
id: "21"
taskid: 23613cf6-e540-4563-8023-437a4b93a3f2
type: regular
task:
id: 23613cf6-e540-4563-8023-437a4b93a3f2
version: -1
name: GitHub-get-download-count
description: Returns the total amount of downloads over all the releases of
the repository
script: '|||GitHub-get-download-count'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "22"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 2120
}
}
note: false
timertriggers: []
ignoreworker: false
"22":
id: "22"
taskid: f68c07b5-73f4-47cd-8aaf-24aeeb1a6a8d
type: condition
task:
id: f68c07b5-73f4-47cd-8aaf-24aeeb1a6a8d
version: -1
name: Verify Results - count
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "54"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualNumber
left:
value:
simple: GitHub.Release.ID
iscontext: true
right:
value:
simple: "19854717"
- - operator: isEqualNumber
left:
value:
simple: GitHub.Release.Download_count
iscontext: true
right:
value:
simple: "0"
view: |-
{
"position": {
"x": 50,
"y": 2295
}
}
note: false
timertriggers: []
ignoreworker: false
"23":
id: "23"
taskid: 4f62f106-d481-4529-8b67-7bcda718e90a
type: condition
task:
id: 4f62f106-d481-4529-8b67-7bcda718e90a
version: -1
name: Verify Results - update
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "19"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.Body
iscontext: true
right:
value:
simple: '"new information"'
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.Title
iscontext: true
right:
value:
simple: '"new issue"'
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.ID
iscontext: true
right:
value:
simple: ID
iscontext: true
view: |-
{
"position": {
"x": 807.5,
"y": 1420
}
}
note: false
timertriggers: []
ignoreworker: false
"24":
id: "24"
taskid: a74de116-8a59-4130-837e-2c500fb7677d
type: condition
task:
id: a74de116-8a59-4130-837e-2c500fb7677d
version: -1
name: Verify Results - closed
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "54"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.State
iscontext: true
right:
value:
simple: closed
- - operator: isEqualString
left:
value:
simple: GitHub.Issue.ID
iscontext: true
right:
value:
simple: ID
iscontext: true
view: |-
{
"position": {
"x": 592.5,
"y": 2295
}
}
note: false
timertriggers: []
ignoreworker: false
"25":
id: "25"
taskid: 6fc8a82c-30b6-48ec-8e5c-d76592aeb08c
type: regular
task:
id: 6fc8a82c-30b6-48ec-8e5c-d76592aeb08c
version: -1
name: Store ID
description: Sets a value into the context with the given context key
scriptName: Set
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "3"
scriptarguments:
append: {}
key:
simple: ID
value:
simple: ${GitHub.Issue.ID}
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 895
}
}
note: false
timertriggers: []
ignoreworker: false
"26":
id: "26"
taskid: d8861a00-a3a9-42fa-8571-34c962fb8ad5
type: regular
task:
id: d8861a00-a3a9-42fa-8571-34c962fb8ad5
version: -1
name: GitHub-get-branch
description: Get a branch
script: GitHub|||GitHub-get-branch
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "27"
scriptarguments:
branch_name:
simple: master
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 370
}
}
note: false
timertriggers: []
ignoreworker: false
"27":
id: "27"
taskid: c9af416b-8b6e-48ce-89f9-5f861f025b77
type: regular
task:
id: c9af416b-8b6e-48ce-89f9-5f861f025b77
version: -1
name: GitHub-create-branch
description: Create a new branch
script: GitHub|||GitHub-create-branch
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "28"
scriptarguments:
branch_name:
simple: test-branch
commit_sha:
complex:
root: GitHub
accessor: Branch.CommitSHA
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 545
}
}
note: false
timertriggers: []
ignoreworker: false
"28":
id: "28"
taskid: 2d40874d-d025-4b39-832b-24b027f8ca73
type: regular
task:
id: 2d40874d-d025-4b39-832b-24b027f8ca73
version: -1
name: GitHub-delete-branch
description: Delete a branch
script: GitHub|||GitHub-delete-branch
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "29"
scriptarguments:
branch_name:
simple: test-branch
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 720
}
}
note: false
timertriggers: []
ignoreworker: false
"29":
id: "29"
taskid: ee43bfe6-8e54-4b3b-8229-8ec26283cc95
type: regular
task:
id: ee43bfe6-8e54-4b3b-8229-8ec26283cc95
version: -1
name: GitHub-get-stale-prs
description: Get inactive pull requests
script: GitHub|||GitHub-get-stale-prs
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "30"
scriptarguments:
label: {}
stale_time:
simple: 1 minutes
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 895
}
}
note: false
timertriggers: []
ignoreworker: false
"30":
id: "30"
taskid: d47a1a63-6418-4796-8bb3-db30e22a8e55
type: condition
task:
id: d47a1a63-6418-4796-8bb3-db30e22a8e55
version: -1
name: Verify Results - get stale prs
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "34"
- "35"
- "36"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualNumber
left:
value:
complex:
root: GitHub
accessor: PR.Number
iscontext: true
right:
value:
simple: "1"
view: |-
{
"position": {
"x": 1667.5,
"y": 1070
}
}
note: false
timertriggers: []
ignoreworker: false
"34":
id: "34"
taskid: e902ab8c-9e9f-4199-8e03-a462a290d3e4
type: regular
task:
id: e902ab8c-9e9f-4199-8e03-a462a290d3e4
version: -1
name: GitHub-request-review
description: Request reviews from GitHub users for a given Pull Request
script: GitHub|||GitHub-request-review
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "37"
scriptarguments:
pull_number:
simple: "1"
reviewers:
simple: content-bot
separatecontext: false
view: |-
{
"position": {
"x": 1237.5,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
"35":
id: "35"
taskid: a2002935-a5d1-4ad9-882f-09b045fd73a6
type: regular
task:
id: a2002935-a5d1-4ad9-882f-09b045fd73a6
version: -1
name: GitHub-create-comment
description: Create a comment for a given issue
script: GitHub|||GitHub-create-comment
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "37"
scriptarguments:
body:
simple: TestPlaybook-Comment
issue_number:
simple: "1"
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
"36":
id: "36"
taskid: f97c7dbb-f816-4c22-8959-717799b74b61
type: regular
task:
id: f97c7dbb-f816-4c22-8959-717799b74b61
version: -1
name: GitHub-add-label
description: Add labels to an issue
script: GitHub|||GitHub-add-label
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "37"
scriptarguments:
issue_number:
simple: "1"
labels:
simple: TEST-LABEL
separatecontext: false
view: |-
{
"position": {
"x": 2097.5,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
"37":
id: "37"
taskid: e2d13130-1c12-47be-88a5-0fe163074b39
type: regular
task:
id: e2d13130-1c12-47be-88a5-0fe163074b39
version: -1
name: GitHub-list-issue-comments
description: List comments on an issue
script: GitHub|||GitHub-list-issue-comments
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "38"
scriptarguments:
issue_number:
simple: "1"
separatecontext: false
view: |-
{
"position": {
"x": 1667.5,
"y": 1420
}
}
note: false
timertriggers: []
ignoreworker: false
"38":
id: "38"
taskid: 3e90cb57-d0b2-449d-8510-f4edc3b85b3b
type: condition
task:
id: 3e90cb57-d0b2-449d-8510-f4edc3b85b3b
version: -1
name: Verify Results - list issue comments
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "39"
- "40"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
complex:
root: GitHub
filters:
- - operator: isEqualNumber
left:
value:
simple: github.heygears.comment.IssueNumber
iscontext: true
right:
value:
simple: "1"
accessor: Comment.Body
iscontext: true
right:
value:
simple: TestPlaybook-Comment
view: |-
{
"position": {
"x": 1667.5,
"y": 1595
}
}
note: false
timertriggers: []
ignoreworker: false
"39":
id: "39"
taskid: acb57d25-7264-43c9-8eea-0c3c60f4d4d2
type: regular
task:
id: acb57d25-7264-43c9-8eea-0c3c60f4d4d2
version: -1
name: GitHub-list-pr-files
description: List pull request files
script: GitHub|||GitHub-list-pr-files
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "41"
scriptarguments:
pull_number:
simple: "1"
separatecontext: false
view: |-
{
"position": {
"x": 1237.5,
"y": 1770
}
}
note: false
timertriggers: []
ignoreworker: false
"40":
id: "40"
taskid: db1c9e63-00b5-4aa3-8799-b75cc7988ad6
type: regular
task:
id: db1c9e63-00b5-4aa3-8799-b75cc7988ad6
version: -1
name: GitHub-list-pr-reviews
description: List reviews on a pull request
script: GitHub|||GitHub-list-pr-reviews
type: regular
iscommand: true
brand: GitHub
nexttasks:
'#none#':
- "42"
scriptarguments: