github-issue-tower-defence-management 1.176.0 → 1.177.0

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.
Files changed (34) hide show
  1. package/.github/workflows/umino-project.yml +4 -107
  2. package/CHANGELOG.md +13 -0
  3. package/bin/adapter/entry-points/console/ui-dist/assets/{index-BhDothvr.js → index-D6aAQrf7.js} +2 -2
  4. package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
  5. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +1 -0
  6. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
  7. package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js +6 -0
  8. package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js.map +1 -1
  9. package/bin/domain/usecases/AssignNoAssigneeIssueToManagerUseCase.js +3 -0
  10. package/bin/domain/usecases/AssignNoAssigneeIssueToManagerUseCase.js.map +1 -1
  11. package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js +23 -10
  12. package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js.map +1 -1
  13. package/package.json +1 -1
  14. package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleItemList.stories.tsx +36 -0
  15. package/src/adapter/entry-points/console/ui/src/features/console/logic/grouping.test.ts +88 -0
  16. package/src/adapter/entry-points/console/ui/src/features/console/logic/grouping.ts +16 -4
  17. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.tsx +13 -3
  18. package/src/adapter/entry-points/console/ui-dist/assets/{index-BhDothvr.js → index-D6aAQrf7.js} +2 -2
  19. package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
  20. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +5 -0
  21. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +1 -0
  22. package/src/adapter/repositories/issue/GraphqlProjectItemRepository.ts +12 -5
  23. package/src/domain/entities/Issue.ts +1 -0
  24. package/src/domain/usecases/AssignNoAssigneeIssueToManagerUseCase.test.ts +49 -0
  25. package/src/domain/usecases/AssignNoAssigneeIssueToManagerUseCase.ts +4 -0
  26. package/src/domain/usecases/SetupTowerDefenceProjectUseCase.test.ts +138 -0
  27. package/src/domain/usecases/SetupTowerDefenceProjectUseCase.ts +41 -17
  28. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
  29. package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts +1 -0
  30. package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts.map +1 -1
  31. package/types/domain/entities/Issue.d.ts +1 -0
  32. package/types/domain/entities/Issue.d.ts.map +1 -1
  33. package/types/domain/usecases/AssignNoAssigneeIssueToManagerUseCase.d.ts.map +1 -1
  34. package/types/domain/usecases/SetupTowerDefenceProjectUseCase.d.ts.map +1 -1
@@ -24,9 +24,6 @@ on:
24
24
  - edited
25
25
  - reopened
26
26
  - synchronize
27
- issue_comment:
28
- types:
29
- - created
30
27
  pull_request_target:
31
28
  types:
32
29
  - opened
@@ -35,7 +32,7 @@ on:
35
32
  - synchronize
36
33
 
37
34
  env:
38
- unread: Unread
35
+ awaiting_workspace: Awaiting Workspace
39
36
  in_progress: In Progress
40
37
  user: HiromiShikata
41
38
  project_id: 48
@@ -49,13 +46,6 @@ jobs:
49
46
  github.actor != 'dependabot[bot]' &&
50
47
  github.actor != 'renovate[bot]' &&
51
48
  github.actor != 'app/dependabot' &&
52
- ((github.event_name != 'issue_comment') ||
53
- (github.event.comment.user.login == 'HiromiShikata' &&
54
- (contains(github.event.comment.body, '/createissue') ||
55
- contains(github.event.comment.body, '/close') ||
56
- contains(github.event.comment.body, '/done') ||
57
- contains(github.event.comment.body, '/movenextactiondateto') ||
58
- contains(github.event.comment.body, '/changeassignee ')))) &&
59
49
  github.event.action != 'labeled'
60
50
  runs-on: ubuntu-latest
61
51
  steps:
@@ -69,7 +59,7 @@ jobs:
69
59
  client-id: ${{ secrets.HS_BOT_GH_AP_CLIENT_ID }}
70
60
  private-key: ${{ secrets.HS_BOT_GH_AP_PRIVATE_KEY }}
71
61
  owner: HiromiShikata
72
- - name: Move issue to ${{ env.unread }}
62
+ - name: Move issue to ${{ env.awaiting_workspace }}
73
63
  run: |
74
64
  RESOURCE_NODE_ID="${{ github.event.pull_request.node_id || github.event.issue.node_id }}"
75
65
  PROJECT_V2_ID="${{ env.project_v2_id }}"
@@ -108,7 +98,7 @@ jobs:
108
98
  --jq '.data.node.fieldValueByName.name // ""')
109
99
 
110
100
  if [ -n "$EXISTING_STATUS" ]; then
111
- echo "Status is already $EXISTING_STATUS; keeping it instead of overwriting with ${{ env.unread }}"
101
+ echo "Status is already $EXISTING_STATUS; keeping it instead of overwriting with ${{ env.awaiting_workspace }}"
112
102
  exit 0
113
103
  fi
114
104
  fi
@@ -118,7 +108,7 @@ jobs:
118
108
  -f projectId="$PROJECT_V2_ID" \
119
109
  -f itemId="$ITEM_ID" \
120
110
  -f fieldId="PVTSSF_lAHOAGJHa84AFWnrzgDFcxE" \
121
- -f optionId="f75ad846"
111
+ -f optionId="d1c19cce"
122
112
  env:
123
113
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
124
114
  if: >-
@@ -170,99 +160,6 @@ jobs:
170
160
  (github.event_name == 'pull_request' && github.event.pull_request.state == 'open')) &&
171
161
  (github.event.action == 'opened' || github.event.action == 'reopened')
172
162
 
173
- - name: Create Issue
174
- if: ${{ github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.comment.user.login == 'HiromiShikata' && contains(github.event.comment.body, '/createissue') }}
175
- uses: actions/github-script@v9
176
- with:
177
- github-token: ${{ steps.app-token.outputs.token }}
178
- script: |
179
- const commentBody = context.payload.comment.body;
180
- const commandMatch = /(^|\n)\s*\/createissue\b/m.exec(commentBody);
181
- if (!commandMatch) return;
182
- const createIssueIndex = commentBody.indexOf('/createissue', commandMatch.index);
183
- const issueTitle = commentBody.slice(createIssueIndex + 12).split('\n')[0].trim();
184
- const issueNumber = context.issue.number;
185
- const commentId = context.payload.comment.id;
186
- const commentLink = `https://github.com/${context.repo.owner}/${context.repo.repo}/issues/${issueNumber}#issuecomment-${commentId}`;
187
- const issueBody = `
188
- ${commentBody.slice(createIssueIndex + 12).trim()}
189
- Created from a comment: ${commentLink}
190
- `;
191
- const newIssue = await github.rest.issues.create({
192
- owner: context.repo.owner,
193
- repo: context.repo.repo,
194
- title: issueTitle,
195
- body: issueBody,
196
- assignees: ['HiromiShikata']
197
- });
198
- - name: Close Issue
199
- if: ${{ github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.comment.user.login == 'HiromiShikata' && (contains(github.event.comment.body, '/close') || contains(github.event.comment.body, '/done')) }}
200
- uses: actions/github-script@v9
201
- with:
202
- github-token: ${{ steps.app-token.outputs.token }}
203
- script: |
204
- const body = context.payload.comment.body;
205
- if (!/(^|\n)\s*\/(close|done)\b/m.test(body)) return;
206
- await github.rest.issues.update({
207
- owner: context.repo.owner,
208
- repo: context.repo.repo,
209
- issue_number: context.issue.number,
210
- state: 'closed'
211
- });
212
- - name: Update Date Field
213
- if: ${{ github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.comment.user.login == 'HiromiShikata' && contains(github.event.comment.body, '/movenextactiondateto') }}
214
- uses: actions/github-script@v9
215
- env:
216
- PROJECT_V2_ID: ${{ env.project_v2_id }}
217
- FIELD_ID: ${{ env.field_id }}
218
- with:
219
- github-token: ${{ steps.app-token.outputs.token }}
220
- script: |
221
- const commentBody = context.payload.comment.body;
222
- const commandMatch = /(^|\n)\s*\/movenextactiondateto\b/m.exec(commentBody);
223
- if (!commandMatch) return;
224
- const dateMatch = /\/movenextactiondateto\s+(\d{8})/.exec(commentBody.slice(commandMatch.index));
225
- if (!dateMatch) return;
226
- const dateString = dateMatch[1];
227
- const projectId = process.env.PROJECT_V2_ID;
228
- const fieldId = process.env.FIELD_ID;
229
- const itemIdResult = await github.graphql(
230
- `query($owner: String!, $repo: String!, $number: Int!) {
231
- repository(owner: $owner, name: $repo) {
232
- issue(number: $number) {
233
- projectItems(first: 10) { nodes { id } }
234
- }
235
- }
236
- }`,
237
- { owner: context.repo.owner, repo: context.repo.repo, number: context.issue.number }
238
- );
239
- const itemId = itemIdResult.repository.issue.projectItems.nodes[0]?.id;
240
- if (!itemId) { core.setFailed('No project item found for this issue'); return; }
241
- await github.graphql(
242
- `mutation($projectId: ID!, $fieldId: ID!, $itemId: ID!, $date: Date!) {
243
- updateProjectV2ItemFieldValue(input: {
244
- projectId: $projectId, fieldId: $fieldId, itemId: $itemId,
245
- value: { date: $date }
246
- }) { clientMutationId }
247
- }`,
248
- { projectId, fieldId, itemId, date: dateString }
249
- );
250
- - name: Change Assignee
251
- if: ${{ github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.comment.user.login == 'HiromiShikata' && contains(github.event.comment.body, '/changeassignee ') }}
252
- uses: actions/github-script@v9
253
- with:
254
- github-token: ${{ steps.app-token.outputs.token }}
255
- script: |
256
- const commentBody = context.payload.comment.body;
257
- const commandMatch = /(^|\n)\s*\/changeassignee\s+(\S+)/m.exec(commentBody);
258
- if (!commandMatch) return;
259
- const assigneeName = commandMatch[2].trim();
260
- await github.rest.issues.update({
261
- owner: context.repo.owner,
262
- repo: context.repo.repo,
263
- issue_number: context.issue.number,
264
- assignees: [assigneeName]
265
- });
266
163
  - name: Auto assign issue to owner
267
164
  if: >-
268
165
  github.event_name == 'issues' &&
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # [1.177.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.176.0...v1.177.0) (2026-08-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **console:** apply snapshot freshness check to overlay story entries in resolveItemStory ([#1732](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1732)) ([44268bc](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/44268bcea8f0dd9068504aeb673d6a6def1a4187)), closes [#1730](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1730)
7
+ * **SetupTowerDefenceProjectUseCase:** move open issues with Done or null status to Awaiting Workspace ([#1736](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1736)) ([5afbcf1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/5afbcf17167981683b78ef9e42c40701b203e3d5)), closes [HiromiShikata/umino-corporait-operation#30853](https://github.com/HiromiShikata/umino-corporait-operation/issues/30853)
8
+
9
+
10
+ ### Features
11
+
12
+ * **assign:** skip assignee update for issues in archived repositories ([#1733](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1733)) ([0e6d0be](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/0e6d0beaf0adcabe03429a80c6ff4674258b2876)), closes [#1731](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1731)
13
+
1
14
  # [1.176.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.175.1...v1.176.0) (2026-08-24)
2
15
 
3
16