Skip to content
This repository was archived by the owner on May 15, 2021. It is now read-only.

Commit ab504c8

Browse files
Merge pull request #63 from technote-space/feature/#61
Cancel all workflows but the latest one (#61)
2 parents 0eaafb7 + 0802e67 commit ab504c8

11 files changed

+229
-160
lines changed

__tests__/fixtures/workflow-run.get1.json __tests__/fixtures/workflow-run.get.30433642.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"pull_requests": [
1313
],
1414
"created_at": "2020-01-22T19:33:08Z",
15-
"updated_at": "2020-01-22T19:33:08Z",
15+
"updated_at": "2020-02-22T19:33:08Z",
1616
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs",
1717
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs",
1818
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",

__tests__/fixtures/workflow-run.get2.json __tests__/fixtures/workflow-run.get.30433644.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
"id": 30433645,
2+
"id": 30433644,
33
"node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==",
44
"head_branch": "master",
55
"head_sha": "acb5820ced9479c074f688cc328bf03f341a511d",
6-
"run_number": 562,
6+
"run_number": 564,
77
"event": "push",
88
"status": "queued",
99
"conclusion": null,
10-
"url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645",
11-
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433645",
10+
"url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644",
11+
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433644",
1212
"pull_requests": [
1313
],
1414
"created_at": "2020-01-24T19:33:08Z",
1515
"updated_at": "2020-01-24T19:33:08Z",
16-
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645/jobs",
17-
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645/logs",
16+
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644/jobs",
17+
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644/logs",
1818
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
19-
"artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645/artifacts",
20-
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645/cancel",
21-
"rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433645/rerun",
22-
"workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/30433645",
19+
"artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644/artifacts",
20+
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644/cancel",
21+
"rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433644/rerun",
22+
"workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/30433644",
2323
"head_commit": {
2424
"id": "acb5820ced9479c074f688cc328bf03f341a511d",
2525
"tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"total_count": 0,
3+
"workflow_runs": []
4+
}

__tests__/fixtures/workflow-run.list.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"pull_requests": [
1616
],
1717
"created_at": "2020-01-22T19:33:08Z",
18-
"updated_at": "2020-01-22T19:33:08Z",
18+
"updated_at": "2020-02-22T19:33:08Z",
1919
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs",
2020
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs",
2121
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
@@ -26,7 +26,7 @@
2626
"head_commit": {
2727
"id": "acb5820ced9479c074f688cc328bf03f341a511d",
2828
"tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223",
29-
"message": "Create linter.yml",
29+
"message": "Re-run workflow",
3030
"timestamp": "2020-01-22T19:33:05Z",
3131
"author": {
3232
"name": "Octo Cat",
@@ -198,7 +198,7 @@
198198
"head_commit": {
199199
"id": "acb5820ced9479c074f688cc328bf03f341a511d",
200200
"tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223",
201-
"message": "Create linter.yml",
201+
"message": "Merge pull request #260 from test",
202202
"timestamp": "2020-01-22T19:33:05Z",
203203
"author": {
204204
"name": "Octo Cat",
@@ -370,7 +370,7 @@
370370
"head_commit": {
371371
"id": "acb5820ced9479c074f688cc328bf03f341a511d",
372372
"tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223",
373-
"message": "Merge pull request #260 from test",
373+
"message": "Create linter.yml",
374374
"timestamp": "2020-01-22T19:33:05Z",
375375
"author": {
376376
"name": "Octo Cat",
@@ -702,8 +702,8 @@
702702
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433646",
703703
"pull_requests": [
704704
],
705-
"created_at": "2020-01-22T19:33:08Z",
706-
"updated_at": "2020-01-22T19:33:08Z",
705+
"created_at": "2020-01-26T19:33:08Z",
706+
"updated_at": "2020-01-26T19:33:08Z",
707707
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433646/jobs",
708708
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433646/logs",
709709
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
@@ -874,8 +874,8 @@
874874
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433647",
875875
"pull_requests": [
876876
],
877-
"created_at": "2020-01-22T19:33:08Z",
878-
"updated_at": "2020-01-22T19:33:08Z",
877+
"created_at": "2020-01-27T19:33:08Z",
878+
"updated_at": "2020-01-27T19:33:08Z",
879879
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433647/jobs",
880880
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433647/logs",
881881
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
@@ -1046,8 +1046,8 @@
10461046
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433648",
10471047
"pull_requests": [
10481048
],
1049-
"created_at": "2020-01-22T19:33:08Z",
1050-
"updated_at": "2020-01-22T19:33:08Z",
1049+
"created_at": "2020-01-28T19:33:08Z",
1050+
"updated_at": "2020-01-28T19:33:08Z",
10511051
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433648/jobs",
10521052
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433648/logs",
10531053
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
@@ -1218,8 +1218,8 @@
12181218
"html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433649",
12191219
"pull_requests": [
12201220
],
1221-
"created_at": "2020-01-22T19:33:08Z",
1222-
"updated_at": "2020-01-22T19:33:08Z",
1221+
"created_at": "2020-01-29T19:33:08Z",
1222+
"updated_at": "2020-01-29T19:33:08Z",
12231223
"jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433649/jobs",
12241224
"logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433649/logs",
12251225
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",

0 commit comments

Comments
 (0)