github-issue-tower-defence-management 1.156.0 → 1.156.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.156.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.156.0...v1.156.1) (2026-08-15)
2
+
3
+
4
+ ### Performance Improvements
5
+
6
+ * skip the project item read for pull requests whose depended issue url is set ([#1587](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1587)) ([e8addbb](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/e8addbb78ccbb77ead3eb9d499a9e4fcee0aa62d)), closes [#1586](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1586)
7
+
1
8
  # [1.156.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.155.0...v1.156.0) (2026-08-15)
2
9
 
3
10
 
@@ -34,6 +34,9 @@ class SetDependedIssueUrlForOpenTaskPRsUseCase {
34
34
  if (!issue.isPr || issue.isClosed) {
35
35
  continue;
36
36
  }
37
+ if (issue.dependedIssueUrls.length > 0) {
38
+ continue;
39
+ }
37
40
  for (const closedIssueUrl of issue.closingIssueReferenceUrls) {
38
41
  const existing = openPrUrlsByClosedIssueUrl.get(closedIssueUrl);
39
42
  if (existing) {
@@ -1 +1 @@
1
- {"version":3,"file":"SetDependedIssueUrlForOpenTaskPRsUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/SetDependedIssueUrlForOpenTaskPRsUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,wCAAwC;IACnD,YACW,eAA6D;QAA7D,oBAAe,GAAf,eAAe,CAA8C;QAGxE,QAAG,GAAG,KAAK,EAAE,KAA4C,EAAiB,EAAE;YAC1E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gCAAgC,EAAE,CAAC;gBACpD,OAAO,CAAC,IAAI,CACV,q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C,cAAc,CAAC,CAAC;oBAChE,IAAI,QAAQ,EAAE,CAAC;wBACb,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAC1B,CAAC;yBAAM,CAAC;wBACN,0BAA0B,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBACvE,CAAC;gBACH,CAAC;YACH,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;YAC3C,KAAK,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,0BAA0B,EAAE,CAAC;gBAClE,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IA1DC,CAAC;CA2DL;AA9DD,4FA8DC"}
1
+ {"version":3,"file":"SetDependedIssueUrlForOpenTaskPRsUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/SetDependedIssueUrlForOpenTaskPRsUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,wCAAwC;IACnD,YACW,eAA6D;QAA7D,oBAAe,GAAf,eAAe,CAA8C;QAGxE,QAAG,GAAG,KAAK,EAAE,KAA4C,EAAiB,EAAE;YAC1E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gCAAgC,EAAE,CAAC;gBACpD,OAAO,CAAC,IAAI,CACV,qHAAqH,CACtH,CAAC;gBACF,OAAO;YACT,CAAC;YACD,MAAM,0BAA0B,GAAG,IAAI,CAAC,+BAA+B,CACrE,KAAK,CAAC,MAAM,CACb,CAAC;YACF,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;oBACjC,SAAS;gBACX,CAAC;gBACD,MAA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,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBACvE,CAAC;gBACH,CAAC;YACH,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;YAC3C,KAAK,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,0BAA0B,EAAE,CAAC;gBAClE,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IA7DC,CAAC;CA8DL;AAjED,4FAiEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-issue-tower-defence-management",
3
- "version": "1.156.0",
3
+ "version": "1.156.1",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -43,6 +43,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
43
43
  ...mock<Issue>(),
44
44
  url: 'https://github.com/owner/repo/pull/100',
45
45
  isPr: true,
46
+ dependedIssueUrls: [],
46
47
  isClosed: false,
47
48
  state: 'OPEN',
48
49
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
@@ -66,6 +67,53 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
66
67
  );
67
68
  });
68
69
 
70
+ it('does not touch a pull request whose depended issue url is already set, so no project item is read for it', async () => {
71
+ const openPrWithDependedIssueUrlAlreadySet: Issue = {
72
+ ...mock<Issue>(),
73
+ url: 'https://github.com/owner/repo/pull/101',
74
+ isPr: true,
75
+ dependedIssueUrls: ['https://github.com/owner/repo/issues/1'],
76
+ isClosed: false,
77
+ state: 'OPEN',
78
+ closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
79
+ };
80
+
81
+ await useCase.run({
82
+ project: projectWithField,
83
+ issues: [openTaskIssue, openPrWithDependedIssueUrlAlreadySet],
84
+ });
85
+
86
+ expect(mockIssueRepository.setDependedIssueUrl).not.toHaveBeenCalled();
87
+ });
88
+
89
+ it('still sets the depended issue url on a pull request that has none, when another pull request already has one', async () => {
90
+ const openPrWithDependedIssueUrlAlreadySet: Issue = {
91
+ ...mock<Issue>(),
92
+ url: 'https://github.com/owner/repo/pull/101',
93
+ isPr: true,
94
+ dependedIssueUrls: ['https://github.com/owner/repo/issues/1'],
95
+ isClosed: false,
96
+ state: 'OPEN',
97
+ closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
98
+ };
99
+
100
+ await useCase.run({
101
+ project: projectWithField,
102
+ issues: [
103
+ openTaskIssue,
104
+ openPrWithDependedIssueUrlAlreadySet,
105
+ openPrClosingIssue1,
106
+ ],
107
+ });
108
+
109
+ expect(mockIssueRepository.setDependedIssueUrl).toHaveBeenCalledTimes(1);
110
+ expect(mockIssueRepository.setDependedIssueUrl).toHaveBeenCalledWith(
111
+ 'https://github.com/owner/repo/pull/100',
112
+ projectWithField,
113
+ openTaskIssue.url,
114
+ );
115
+ });
116
+
69
117
  it('should never call the per-issue timeline lookup', async () => {
70
118
  await useCase.run({
71
119
  project: projectWithField,
@@ -80,6 +128,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
80
128
  ...mock<Issue>(),
81
129
  url: 'https://github.com/owner/repo/pull/101',
82
130
  isPr: true,
131
+ dependedIssueUrls: [],
83
132
  isClosed: false,
84
133
  state: 'OPEN',
85
134
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/2'],
@@ -98,6 +147,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
98
147
  ...mock<Issue>(),
99
148
  url: 'https://github.com/owner/repo/pull/102',
100
149
  isPr: true,
150
+ dependedIssueUrls: [],
101
151
  isClosed: true,
102
152
  state: 'CLOSED',
103
153
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
@@ -116,6 +166,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
116
166
  ...mock<Issue>(),
117
167
  url: 'https://github.com/owner/repo/pull/103',
118
168
  isPr: true,
169
+ dependedIssueUrls: [],
119
170
  isClosed: false,
120
171
  state: 'OPEN',
121
172
  closingIssueReferenceUrls: [],
@@ -142,6 +193,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
142
193
  ...mock<Issue>(),
143
194
  url: 'https://github.com/owner/repo/pull/104',
144
195
  isPr: true,
196
+ dependedIssueUrls: [],
145
197
  isClosed: false,
146
198
  state: 'OPEN',
147
199
  closingIssueReferenceUrls: [
@@ -198,6 +250,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
198
250
  ...mock<Issue>(),
199
251
  url: 'https://github.com/owner/repo/pull/200',
200
252
  isPr: true,
253
+ dependedIssueUrls: [],
201
254
  isClosed: false,
202
255
  state: 'OPEN',
203
256
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/3'],
@@ -232,6 +285,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
232
285
  ...mock<Issue>(),
233
286
  url: 'https://github.com/owner/repo/pull/105',
234
287
  isPr: true,
288
+ dependedIssueUrls: [],
235
289
  isClosed: false,
236
290
  state: 'OPEN',
237
291
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
@@ -263,6 +317,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
263
317
  ...mock<Issue>(),
264
318
  url: failingPrUrl,
265
319
  isPr: true,
320
+ dependedIssueUrls: [],
266
321
  isClosed: false,
267
322
  state: 'OPEN',
268
323
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
@@ -271,6 +326,7 @@ describe('SetDependedIssueUrlForOpenTaskPRsUseCase', () => {
271
326
  ...mock<Issue>(),
272
327
  url: succeedingPrUrl,
273
328
  isPr: true,
329
+ dependedIssueUrls: [],
274
330
  isClosed: false,
275
331
  state: 'OPEN',
276
332
  closingIssueReferenceUrls: ['https://github.com/owner/repo/issues/1'],
@@ -49,6 +49,9 @@ export class SetDependedIssueUrlForOpenTaskPRsUseCase {
49
49
  if (!issue.isPr || issue.isClosed) {
50
50
  continue;
51
51
  }
52
+ if (issue.dependedIssueUrls.length > 0) {
53
+ continue;
54
+ }
52
55
  for (const closedIssueUrl of issue.closingIssueReferenceUrls) {
53
56
  const existing = openPrUrlsByClosedIssueUrl.get(closedIssueUrl);
54
57
  if (existing) {
@@ -1 +1 @@
1
- {"version":3,"file":"SetDependedIssueUrlForOpenTaskPRsUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/SetDependedIssueUrlForOpenTaskPRsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,qBAAa,wCAAwC;IAEjD,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC;gBAA7D,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAGxE,GAAG,GAAU,OAAO;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE;IAEF,OAAO,CAAC,+BAA+B,CAsBrC;CACH"}
1
+ {"version":3,"file":"SetDependedIssueUrlForOpenTaskPRsUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/SetDependedIssueUrlForOpenTaskPRsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,qBAAa,wCAAwC;IAEjD,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC;gBAA7D,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAGxE,GAAG,GAAU,OAAO;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE;IAEF,OAAO,CAAC,+BAA+B,CAyBrC;CACH"}