github-issue-tower-defence-management 1.152.0 → 1.152.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/api-created_issue_pr.yml +1 -1
- package/.github/workflows/ci-failure-issue-creator.yml +1 -1
- package/.github/workflows/close-manual-prs.yml +1 -1
- package/.github/workflows/commit-lint.yml +1 -1
- package/.github/workflows/console-ui.yml +1 -1
- package/.github/workflows/create-pr.yml +1 -1
- package/.github/workflows/secret-scan.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/.github/workflows/umino-project.yml +2 -2
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/adapter/ci/workflowRunCancellation.test.ts +42 -10
|
@@ -13,7 +13,7 @@ on:
|
|
|
13
13
|
jobs:
|
|
14
14
|
create-or-comment-issue:
|
|
15
15
|
if: github.event.check_suite.conclusion == 'failure' && github.event.check_suite.head_branch == github.event.repository.default_branch
|
|
16
|
-
runs-on:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
17
|
permissions:
|
|
18
18
|
issues: write
|
|
19
19
|
steps:
|
|
@@ -16,7 +16,7 @@ on:
|
|
|
16
16
|
|
|
17
17
|
jobs:
|
|
18
18
|
close-manual-pr:
|
|
19
|
-
runs-on:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
20
|
if: github.event_name != 'pull_request' || github.event.pull_request.user.type != 'Bot'
|
|
21
21
|
steps:
|
|
22
22
|
- uses: step-security/harden-runner@v2
|
|
@@ -10,7 +10,7 @@ on:
|
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
12
|
create_and_enable_automerge:
|
|
13
|
-
runs-on:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
14
|
if: github.ref_name != github.event.repository.default_branch
|
|
15
15
|
steps:
|
|
16
16
|
- uses: step-security/harden-runner@v2
|
|
@@ -57,7 +57,7 @@ jobs:
|
|
|
57
57
|
contains(github.event.comment.body, '/movenextactiondateto') ||
|
|
58
58
|
contains(github.event.comment.body, '/changeassignee ')))) &&
|
|
59
59
|
github.event.action != 'labeled'
|
|
60
|
-
runs-on:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
61
|
steps:
|
|
62
62
|
- uses: step-security/harden-runner@v2
|
|
63
63
|
with:
|
|
@@ -281,7 +281,7 @@ jobs:
|
|
|
281
281
|
repo-token: ${{ steps.app-token.outputs.token }}
|
|
282
282
|
|
|
283
283
|
check_pull_requests_to_link_issues:
|
|
284
|
-
runs-on:
|
|
284
|
+
runs-on: ubuntu-latest
|
|
285
285
|
name: Check linked issues in pull requests
|
|
286
286
|
if: >-
|
|
287
287
|
github.repository != 'HiromiShikata/test-repository' &&
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.152.2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.152.1...v1.152.2) (2026-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update package-lock.json to resolve js-yaml vulnerability ([#1550](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1550)) ([b49fb5f](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b49fb5f97a40b6ed47865307b318278c317796c8)), closes [hi#severity](https://github.com/hi/issues/severity) [#1549](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1549)
|
|
7
|
+
|
|
8
|
+
## [1.152.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.152.0...v1.152.1) (2026-08-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **ci:** key concurrency group on sha for default branch to prevent queued run cancellation ([#1547](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1547)) ([b8dc4d0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b8dc4d0bdcb2a07b6568a57acfaa048f518278f8)), closes [#1515](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1515)
|
|
14
|
+
|
|
1
15
|
# [1.152.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.151.7...v1.152.0) (2026-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -43,19 +43,49 @@ const pushesCommitsToTheRepository = (fileName: string): boolean => {
|
|
|
43
43
|
);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const concurrencyGroupForPush = (
|
|
47
|
+
workflowPrefix: string,
|
|
48
|
+
ref: string,
|
|
49
|
+
sha: string,
|
|
50
|
+
): string => `${workflowPrefix}-${ref === defaultBranchRef ? sha : ref}`;
|
|
51
|
+
|
|
52
|
+
const concurrencyGroupExpression = (workflowPrefix: string): string =>
|
|
53
|
+
`${workflowPrefix}-\${{ github.ref == '${defaultBranchRef}' && github.sha || github.ref }}`;
|
|
54
|
+
|
|
46
55
|
const guardedWorkflows = [
|
|
47
|
-
{ fileName: 'test.yml',
|
|
48
|
-
{
|
|
49
|
-
fileName: 'console-ui.yml',
|
|
50
|
-
concurrencyGroup: `console-ui-\${{ github.ref }}`,
|
|
51
|
-
},
|
|
56
|
+
{ fileName: 'test.yml', workflowPrefix: 'test' },
|
|
57
|
+
{ fileName: 'console-ui.yml', workflowPrefix: 'console-ui' },
|
|
52
58
|
];
|
|
53
59
|
|
|
54
60
|
describe('push-triggered workflow run cancellation', () => {
|
|
61
|
+
describe('concurrency group behavior', () => {
|
|
62
|
+
it('gives each default-branch commit its own group so queued runs survive incoming commits', () => {
|
|
63
|
+
expect(
|
|
64
|
+
concurrencyGroupForPush('test', defaultBranchRef, 'abc123'),
|
|
65
|
+
).not.toBe(concurrencyGroupForPush('test', defaultBranchRef, 'def456'));
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('gives all pushes of the same feature branch the same group so superseded runs are cancelled', () => {
|
|
69
|
+
const featureBranchRef = 'refs/heads/feature/my-feature';
|
|
70
|
+
expect(concurrencyGroupForPush('test', featureBranchRef, 'abc123')).toBe(
|
|
71
|
+
concurrencyGroupForPush('test', featureBranchRef, 'def456'),
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('keeps groups distinct across workflows so unrelated workflows never cancel each other', () => {
|
|
76
|
+
const groups = guardedWorkflows.map(({ workflowPrefix }) =>
|
|
77
|
+
concurrencyGroupForPush(workflowPrefix, defaultBranchRef, 'abc123'),
|
|
78
|
+
);
|
|
79
|
+
expect(new Set(groups).size).toBe(groups.length);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
55
83
|
it.each(guardedWorkflows)(
|
|
56
|
-
'keys the concurrency group of $fileName on the
|
|
57
|
-
({ fileName,
|
|
58
|
-
expect(readWorkflowConcurrency(fileName)['group']).toBe(
|
|
84
|
+
'keys the concurrency group of $fileName on the commit sha for default branch or the ref for other branches',
|
|
85
|
+
({ fileName, workflowPrefix }) => {
|
|
86
|
+
expect(readWorkflowConcurrency(fileName)['group']).toBe(
|
|
87
|
+
concurrencyGroupExpression(workflowPrefix),
|
|
88
|
+
);
|
|
59
89
|
},
|
|
60
90
|
);
|
|
61
91
|
|
|
@@ -78,8 +108,10 @@ describe('push-triggered workflow run cancellation', () => {
|
|
|
78
108
|
it.each(workflowFileNames().filter(pushesCommitsToTheRepository))(
|
|
79
109
|
'never cancels a run of %s, which pushes commits to the repository',
|
|
80
110
|
(fileName) => {
|
|
81
|
-
|
|
82
|
-
readWorkflowConcurrency(fileName)['cancel-in-progress']
|
|
111
|
+
const cancelInProgress =
|
|
112
|
+
readWorkflowConcurrency(fileName)['cancel-in-progress'];
|
|
113
|
+
expect(cancelInProgress === undefined || cancelInProgress === false).toBe(
|
|
114
|
+
true,
|
|
83
115
|
);
|
|
84
116
|
},
|
|
85
117
|
);
|