github-issue-tower-defence-management 1.16.2 → 1.21.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/.github/copilot-instructions.md +0 -0
- package/.github/instructions/code-review.instructions.md +43 -0
- package/.github/workflows/codeql.yml +101 -0
- package/.github/workflows/commit-lint.yml +2 -2
- package/.github/workflows/create-pr.yml +4 -4
- package/.github/workflows/empty-format-test-job.yml +2 -2
- package/.github/workflows/format.yml +3 -3
- package/.github/workflows/publish.yml +10 -4
- package/.github/workflows/test.yml +2 -2
- package/.github/workflows/umino-project.yml +1 -1
- package/CHANGELOG.md +19 -0
- package/bin/adapter/entry-points/function/getStoryObjectMap.js +6 -0
- package/bin/adapter/entry-points/function/getStoryObjectMap.js.map +1 -0
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js +150 -0
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js.map +1 -0
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +12 -49
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/repositories/AxiosSlackRepository.js +55 -1
- package/bin/adapter/repositories/AxiosSlackRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +13 -55
- package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/CheerioIssueRepository.js +0 -5
- package/bin/adapter/repositories/issue/CheerioIssueRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js +3 -3
- package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/InternalGraphqlIssueRepository.js +1406 -1266
- package/bin/adapter/repositories/issue/InternalGraphqlIssueRepository.js.map +1 -1
- package/bin/adapter/repositories/issue/RestIssueRepository.js +12 -0
- package/bin/adapter/repositories/issue/RestIssueRepository.js.map +1 -1
- package/bin/domain/usecases/AnalyzeProblemByIssueUseCase.js +4 -41
- package/bin/domain/usecases/AnalyzeProblemByIssueUseCase.js.map +1 -1
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js +4 -3
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js.map +1 -1
- package/bin/domain/usecases/GetStoryObjectMapUseCase.js +53 -0
- package/bin/domain/usecases/GetStoryObjectMapUseCase.js.map +1 -0
- package/bin/domain/usecases/HandleScheduledEventUseCase.js +9 -63
- package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
- package/bin/domain/usecases/UpdateIssueStatusByLabelUseCase.js +36 -0
- package/bin/domain/usecases/UpdateIssueStatusByLabelUseCase.js.map +1 -0
- package/bin/index.js +3 -1
- package/bin/index.js.map +1 -1
- package/package.json +12 -6
- package/renovate.json +4 -6
- package/src/adapter/entry-points/function/getStoryObjectMap.ts +3 -0
- package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts +103 -0
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +5 -31
- package/src/adapter/repositories/AxiosSlackRepository.test.ts +1 -1
- package/src/adapter/repositories/AxiosSlackRepository.ts +35 -1
- package/src/adapter/repositories/GraphqlProjectRepository.test.ts +21 -3
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +67 -25
- package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +12 -78
- package/src/adapter/repositories/issue/CheerioIssueRepository.test.ts +1 -71
- package/src/adapter/repositories/issue/CheerioIssueRepository.ts +7 -14
- package/src/adapter/repositories/issue/GraphqlProjectItemRepository.test.ts +0 -4
- package/src/adapter/repositories/issue/GraphqlProjectItemRepository.ts +5 -3
- package/src/adapter/repositories/issue/InternalGraphqlIssueRepository.test.ts +0 -68
- package/src/adapter/repositories/issue/InternalGraphqlIssueRepository.ts +64 -24
- package/src/adapter/repositories/issue/RestIssueRepository.test.ts +38 -2
- package/src/adapter/repositories/issue/RestIssueRepository.ts +17 -1
- package/src/domain/entities/Issue.ts +0 -2
- package/src/domain/usecases/AnalyzeProblemByIssueUseCase.ts +5 -75
- package/src/domain/usecases/ChangeStatusByStoryColorUseCase.test.ts +2 -20
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.test.ts +151 -52
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts +4 -5
- package/src/domain/usecases/CreateNewStoryByLabelUseCase.test.ts +1 -18
- package/src/domain/usecases/GetStoryObjectMapUseCase.test.ts +329 -0
- package/src/domain/usecases/GetStoryObjectMapUseCase.ts +92 -0
- package/src/domain/usecases/HandleScheduledEventUseCase.test.ts +58 -18
- package/src/domain/usecases/HandleScheduledEventUseCase.ts +12 -104
- package/src/domain/usecases/UpdateIssueStatusByLabelUseCase.test.ts +284 -0
- package/src/domain/usecases/UpdateIssueStatusByLabelUseCase.ts +58 -0
- package/src/domain/usecases/adapter-interfaces/IssueRepository.ts +1 -0
- package/src/index.ts +6 -0
- package/types/adapter/entry-points/function/getStoryObjectMap.d.ts +7 -0
- package/types/adapter/entry-points/function/getStoryObjectMap.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts +12 -0
- package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/repositories/AxiosSlackRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +4 -5
- package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/CheerioIssueRepository.d.ts +6 -4
- package/types/adapter/repositories/issue/CheerioIssueRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/InternalGraphqlIssueRepository.d.ts +2 -2
- package/types/adapter/repositories/issue/InternalGraphqlIssueRepository.d.ts.map +1 -1
- package/types/adapter/repositories/issue/RestIssueRepository.d.ts +2 -1
- package/types/adapter/repositories/issue/RestIssueRepository.d.ts.map +1 -1
- package/types/domain/entities/Issue.d.ts +0 -2
- package/types/domain/entities/Issue.d.ts.map +1 -1
- package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts +2 -3
- package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts.map +1 -1
- package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts +0 -2
- package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts.map +1 -1
- package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts +32 -0
- package/types/domain/usecases/GetStoryObjectMapUseCase.d.ts.map +1 -0
- package/types/domain/usecases/HandleScheduledEventUseCase.d.ts +6 -29
- package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
- package/types/domain/usecases/UpdateIssueStatusByLabelUseCase.d.ts +15 -0
- package/types/domain/usecases/UpdateIssueStatusByLabelUseCase.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts +1 -0
- package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts.map +1 -1
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +1 -1
- package/src/adapter/repositories/issue/issueTimelineUtils.test.ts +0 -79
- package/src/adapter/repositories/issue/issueTimelineUtils.ts +0 -52
- package/src/domain/entities/WorkingTime.ts +0 -8
- package/src/domain/usecases/ChangeStatusLongInReviewIssueUseCase.test.ts +0 -204
- package/src/domain/usecases/ChangeStatusLongInReviewIssueUseCase.ts +0 -57
- package/src/domain/usecases/GenerateWorkingTimeReportUseCase.test.ts +0 -392
- package/src/domain/usecases/GenerateWorkingTimeReportUseCase.ts +0 -284
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: '**'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Code Review Instructions
|
|
6
|
+
|
|
7
|
+
## Scope Integrity
|
|
8
|
+
|
|
9
|
+
Flag pull requests that contain changes unrelated to the stated PR title or description.
|
|
10
|
+
Each PR must address a single topic or feature.
|
|
11
|
+
If unrelated modifications are detected, request that they be split into separate issues first.
|
|
12
|
+
|
|
13
|
+
## Lint and Static Analysis Bypass Detection
|
|
14
|
+
|
|
15
|
+
Flag any code that disables, ignores, or bypasses linting rules.
|
|
16
|
+
Report usage of eslint-disable, @ts-ignore, @ts-expect-error, noqa, or similar suppression comments.
|
|
17
|
+
Flag modifications to linter configuration files that weaken existing rules.
|
|
18
|
+
|
|
19
|
+
## Error Handling Violations
|
|
20
|
+
|
|
21
|
+
Flag code that catches exceptions but does nothing with them (empty catch blocks).
|
|
22
|
+
Flag API endpoints that return HTTP 200 status codes when errors have occurred.
|
|
23
|
+
Flag code that converts errors into success responses or hides error states.
|
|
24
|
+
Flag use of console.log for error handling instead of proper error propagation.
|
|
25
|
+
Flag code that swallows errors by returning default values without logging or reporting.
|
|
26
|
+
|
|
27
|
+
## Test Coverage Requirements
|
|
28
|
+
|
|
29
|
+
Flag new features or bug fixes that lack corresponding unit tests.
|
|
30
|
+
Flag modifications to existing code where related tests have not been updated.
|
|
31
|
+
Flag deletion or disabling of existing tests without justification.
|
|
32
|
+
Flag test files that use skip, only, or other mechanisms to bypass test execution.
|
|
33
|
+
Flag mock implementations that always return success without testing failure scenarios.
|
|
34
|
+
Report when test coverage for modified files appears insufficient.
|
|
35
|
+
Report when test assertion for modified files appears insufficient.
|
|
36
|
+
|
|
37
|
+
## Code Quality Red Flags
|
|
38
|
+
|
|
39
|
+
Flag hardcoded credentials, API keys, or secrets.
|
|
40
|
+
Flag commented-out code blocks.
|
|
41
|
+
Flag TODO or FIXME comments without associated issue references.
|
|
42
|
+
Flag any use of type assertions (as any, as unknown) that bypass type safety.
|
|
43
|
+
Flag functions with excessive cyclomatic complexity.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: 'CodeQL Advanced'
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: ['main']
|
|
17
|
+
pull_request:
|
|
18
|
+
branches: ['main']
|
|
19
|
+
schedule:
|
|
20
|
+
- cron: '42 8 * * 6'
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
analyze:
|
|
24
|
+
name: Analyze (${{ matrix.language }})
|
|
25
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
26
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
27
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
28
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
|
29
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
|
30
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
31
|
+
permissions:
|
|
32
|
+
# required for all workflows
|
|
33
|
+
security-events: write
|
|
34
|
+
|
|
35
|
+
# required to fetch internal or private CodeQL packs
|
|
36
|
+
packages: read
|
|
37
|
+
|
|
38
|
+
# only required for workflows in private repositories
|
|
39
|
+
actions: read
|
|
40
|
+
contents: read
|
|
41
|
+
|
|
42
|
+
strategy:
|
|
43
|
+
fail-fast: false
|
|
44
|
+
matrix:
|
|
45
|
+
include:
|
|
46
|
+
- language: actions
|
|
47
|
+
build-mode: none
|
|
48
|
+
- language: javascript-typescript
|
|
49
|
+
build-mode: none
|
|
50
|
+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
|
51
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
|
52
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
|
53
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
|
54
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
|
55
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
|
56
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
|
57
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
58
|
+
steps:
|
|
59
|
+
- name: Checkout repository
|
|
60
|
+
uses: actions/checkout@v6
|
|
61
|
+
|
|
62
|
+
# Add any setup steps before running the `github/codeql-action/init` action.
|
|
63
|
+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
|
64
|
+
# or others). This is typically only required for manual builds.
|
|
65
|
+
# - name: Setup runtime (example)
|
|
66
|
+
# uses: actions/setup-example@v1
|
|
67
|
+
|
|
68
|
+
# Initializes the CodeQL tools for scanning.
|
|
69
|
+
- name: Initialize CodeQL
|
|
70
|
+
uses: github/codeql-action/init@v4
|
|
71
|
+
with:
|
|
72
|
+
languages: ${{ matrix.language }}
|
|
73
|
+
build-mode: ${{ matrix.build-mode }}
|
|
74
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
75
|
+
# By default, queries listed here will override any specified in a config file.
|
|
76
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
77
|
+
|
|
78
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
79
|
+
# queries: security-extended,security-and-quality
|
|
80
|
+
|
|
81
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
|
82
|
+
# "We were unable to automatically build your code", modify the matrix above
|
|
83
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
|
84
|
+
# to build your code.
|
|
85
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
86
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
87
|
+
- name: Run manual build steps
|
|
88
|
+
if: matrix.build-mode == 'manual'
|
|
89
|
+
shell: bash
|
|
90
|
+
run: |
|
|
91
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
92
|
+
'languages you are analyzing, replace this with the commands to build' \
|
|
93
|
+
'your code, for example:'
|
|
94
|
+
echo ' make bootstrap'
|
|
95
|
+
echo ' make release'
|
|
96
|
+
exit 1
|
|
97
|
+
|
|
98
|
+
- name: Perform CodeQL Analysis
|
|
99
|
+
uses: github/codeql-action/analyze@v4
|
|
100
|
+
with:
|
|
101
|
+
category: '/language:${{matrix.language}}'
|
|
@@ -20,12 +20,12 @@ jobs:
|
|
|
20
20
|
contents: read
|
|
21
21
|
steps:
|
|
22
22
|
- name: Checkout code
|
|
23
|
-
uses: actions/checkout@
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
24
|
with:
|
|
25
25
|
fetch-depth: 0
|
|
26
26
|
|
|
27
27
|
- name: Use Node.js
|
|
28
|
-
uses: actions/setup-node@
|
|
28
|
+
uses: actions/setup-node@v6
|
|
29
29
|
|
|
30
30
|
- name: Check for DONTMERGE
|
|
31
31
|
run: |
|
|
@@ -10,11 +10,11 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout repository
|
|
13
|
-
uses: actions/checkout@
|
|
13
|
+
uses: actions/checkout@v6
|
|
14
14
|
|
|
15
15
|
- name: Set branch name as output
|
|
16
16
|
id: branch_name
|
|
17
|
-
run: echo "
|
|
17
|
+
run: echo "branch=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT"
|
|
18
18
|
|
|
19
19
|
- name: Create Pull Request
|
|
20
20
|
id: create_pr
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
pr_body: |
|
|
28
28
|
:magic_wand: :sparkles:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
pr_draft: false
|
|
31
31
|
|
|
32
32
|
- name: Assign PR to author
|
|
33
33
|
if: steps.create_pr.outputs.pr_number
|
|
@@ -44,7 +44,7 @@ jobs:
|
|
|
44
44
|
run: |
|
|
45
45
|
PR_DATA=$(curl -s -H "Authorization: token ${{ secrets.GH_TOKEN }}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pr_number }}")
|
|
46
46
|
PR_ID=$(echo "$PR_DATA" | jq -r '.node_id')
|
|
47
|
-
echo "
|
|
47
|
+
echo "node_id=$PR_ID" >> "$GITHUB_OUTPUT"
|
|
48
48
|
|
|
49
49
|
- name: Enable Auto Merge for PR
|
|
50
50
|
if: steps.create_pr.outputs.pr_number
|
|
@@ -13,9 +13,9 @@ jobs:
|
|
|
13
13
|
permissions:
|
|
14
14
|
contents: write
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
17
|
with:
|
|
18
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
18
|
+
token: ${{ secrets.GH_TOKEN || github.token }}
|
|
19
19
|
- uses: actions/setup-node@v4
|
|
20
20
|
with:
|
|
21
21
|
node-version: 20
|
|
@@ -11,12 +11,12 @@ jobs:
|
|
|
11
11
|
permissions:
|
|
12
12
|
contents: write
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
15
|
with:
|
|
16
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
16
|
+
token: ${{ secrets.GH_TOKEN || github.token }}
|
|
17
17
|
- uses: actions/setup-node@v4
|
|
18
18
|
with:
|
|
19
|
-
node-version:
|
|
19
|
+
node-version: 24
|
|
20
20
|
- run: git pull
|
|
21
21
|
- run: npm ci
|
|
22
22
|
- run: npm run fmt && git --no-pager diff
|
|
@@ -13,19 +13,25 @@ env:
|
|
|
13
13
|
jobs:
|
|
14
14
|
publish:
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
issues: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
id-token: write
|
|
16
21
|
steps:
|
|
17
22
|
- uses: actions/create-github-app-token@v2
|
|
18
23
|
id: app-token
|
|
19
24
|
with:
|
|
20
25
|
app-id: ${{ env.RELEASE_APP_ID }}
|
|
21
26
|
private-key: ${{ env.RELEASE_APP_PRIVATE_KEY }}
|
|
22
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@v6
|
|
23
28
|
with:
|
|
24
29
|
token: ${{ steps.app-token.outputs.token }}
|
|
30
|
+
fetch-depth: 0
|
|
25
31
|
|
|
26
|
-
- uses: actions/setup-node@
|
|
32
|
+
- uses: actions/setup-node@v6
|
|
27
33
|
with:
|
|
28
|
-
node-version:
|
|
34
|
+
node-version: 24
|
|
29
35
|
|
|
30
36
|
- run: npm ci
|
|
31
37
|
- run: npm run build
|
|
@@ -34,7 +40,7 @@ jobs:
|
|
|
34
40
|
|
|
35
41
|
- run: npx semantic-release
|
|
36
42
|
env:
|
|
37
|
-
|
|
43
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
38
44
|
- run: |
|
|
39
45
|
git status
|
|
40
46
|
git add -A
|
|
@@ -13,13 +13,13 @@ jobs:
|
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout repository
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v6
|
|
17
17
|
with:
|
|
18
18
|
fetch-depth: 0
|
|
19
19
|
|
|
20
20
|
- uses: actions/setup-node@v4
|
|
21
21
|
with:
|
|
22
|
-
node-version:
|
|
22
|
+
node-version: 24
|
|
23
23
|
- name: Install dependencies
|
|
24
24
|
run: npm ci
|
|
25
25
|
|
|
@@ -41,7 +41,7 @@ env:
|
|
|
41
41
|
|
|
42
42
|
jobs:
|
|
43
43
|
umino-job:
|
|
44
|
-
if: github.event_name != 'issue_comment' || github.event.comment.user.login != 'umino-bot'
|
|
44
|
+
if: (github.event_name != 'issue_comment' || github.event.comment.user.login != 'umino-bot') && github.event.action != 'labeled'
|
|
45
45
|
runs-on: ubuntu-latest
|
|
46
46
|
steps:
|
|
47
47
|
- name: Move issue to ${{ env.unread }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.21.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.21.0...v1.21.1) (2026-02-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **core:** configure OIDC trusted publishing for npm releases ([c5d44b7](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/c5d44b72b94ae47abdd70abf6651648853187a75))
|
|
7
|
+
* **core:** upgrade semantic-release to v25 for OIDC trusted publishing ([b0fcdc5](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b0fcdc5dd4e29cf67ccb77ec7a589c6d1bd458c2))
|
|
8
|
+
|
|
9
|
+
## [1.16.3](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.16.2...v1.16.3) (2025-12-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **core:** use hasNextPage for pagination to prevent infinite loop ([9fc8907](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9fc890774c66f9dd116f1f4ba23b885067d3777f))
|
|
15
|
+
* **lint:** remove type assertion to satisfy no-type-assertion rule ([4cef9df](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/4cef9df488c7b163c16e5e7e0b1ac5617e1d011f))
|
|
16
|
+
* **test:** make GitHubBetaFeatureViewData type more flexible ([b625775](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b625775fde4776f3175cb56fc3ec1c5e307a9fba))
|
|
17
|
+
* **test:** relax GitHubBetaFeatureViewData validation ([57b9049](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/57b904962810ec2c5115e16cac12f268f96c42b3))
|
|
18
|
+
* **test:** update integration tests for GitHub data structure changes ([adf808b](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/adf808b450c92156547d3f57fb92743d11af0174))
|
|
19
|
+
|
|
1
20
|
## [1.16.2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.16.1...v1.16.2) (2025-10-18)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStoryObjectMap = void 0;
|
|
4
|
+
const GetStoryObjectMapUseCaseHandler_1 = require("../handlers/GetStoryObjectMapUseCaseHandler");
|
|
5
|
+
exports.getStoryObjectMap = new GetStoryObjectMapUseCaseHandler_1.GetStoryObjectMapUseCaseHandler().handle;
|
|
6
|
+
//# sourceMappingURL=getStoryObjectMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStoryObjectMap.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/function/getStoryObjectMap.ts"],"names":[],"mappings":";;;AAAA,iGAA8F;AAEjF,QAAA,iBAAiB,GAAG,IAAI,iEAA+B,EAAE,CAAC,MAAM,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.GetStoryObjectMapUseCaseHandler = void 0;
|
|
30
|
+
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
31
|
+
const yaml_1 = __importDefault(require("yaml"));
|
|
32
|
+
const typia_1 = __importDefault(require("typia"));
|
|
33
|
+
const fs_1 = __importDefault(require("fs"));
|
|
34
|
+
const LocalStorageRepository_1 = require("../../repositories/LocalStorageRepository");
|
|
35
|
+
const GraphqlProjectRepository_1 = require("../../repositories/GraphqlProjectRepository");
|
|
36
|
+
const ApiV3IssueRepository_1 = require("../../repositories/issue/ApiV3IssueRepository");
|
|
37
|
+
const RestIssueRepository_1 = require("../../repositories/issue/RestIssueRepository");
|
|
38
|
+
const GraphqlProjectItemRepository_1 = require("../../repositories/issue/GraphqlProjectItemRepository");
|
|
39
|
+
const ApiV3CheerioRestIssueRepository_1 = require("../../repositories/issue/ApiV3CheerioRestIssueRepository");
|
|
40
|
+
const LocalStorageCacheRepository_1 = require("../../repositories/LocalStorageCacheRepository");
|
|
41
|
+
const axios_1 = __importDefault(require("axios"));
|
|
42
|
+
const CheerioProjectRepository_1 = require("../../repositories/CheerioProjectRepository");
|
|
43
|
+
const GetStoryObjectMapUseCase_1 = require("../../../domain/usecases/GetStoryObjectMapUseCase");
|
|
44
|
+
class GetStoryObjectMapUseCaseHandler {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.handle = async (configFilePath, verbose) => {
|
|
47
|
+
axios_1.default.interceptors.response.use((response) => response, (error) => {
|
|
48
|
+
if (verbose) {
|
|
49
|
+
throw new Error(`API Error: ${JSON.stringify(error)}`);
|
|
50
|
+
}
|
|
51
|
+
if (error.response) {
|
|
52
|
+
throw new Error(`API Error: ${error.response.status}`);
|
|
53
|
+
}
|
|
54
|
+
throw new Error('Network Error');
|
|
55
|
+
});
|
|
56
|
+
const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
|
|
57
|
+
const input = yaml_1.default.parse(configFileContent);
|
|
58
|
+
if (!(() => { const _io0 = input => "string" === typeof input.projectUrl && "number" === typeof input.allowIssueCacheMinutes && "string" === typeof input.projectName && ("object" === typeof input.credentials && null !== input.credentials && _io1(input.credentials)); const _io1 = input => "object" === typeof input.bot && null !== input.bot && _io2(input.bot); const _io2 = input => "object" === typeof input.github && null !== input.github && _io3(input.github); const _io3 = input => "string" === typeof input.token; return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
|
|
59
|
+
throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const _io0 = input => "string" === typeof input.projectUrl && "number" === typeof input.allowIssueCacheMinutes && "string" === typeof input.projectName && ("object" === typeof input.credentials && null !== input.credentials && _io1(input.credentials)); const _io1 = input => "object" === typeof input.bot && null !== input.bot && _io2(input.bot); const _io2 = input => "object" === typeof input.github && null !== input.github && _io3(input.github); const _io3 = input => "string" === typeof input.token; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectUrl || _report(_exceptionable, {
|
|
60
|
+
path: _path + ".projectUrl",
|
|
61
|
+
expected: "string",
|
|
62
|
+
value: input.projectUrl
|
|
63
|
+
}), "number" === typeof input.allowIssueCacheMinutes || _report(_exceptionable, {
|
|
64
|
+
path: _path + ".allowIssueCacheMinutes",
|
|
65
|
+
expected: "number",
|
|
66
|
+
value: input.allowIssueCacheMinutes
|
|
67
|
+
}), "string" === typeof input.projectName || _report(_exceptionable, {
|
|
68
|
+
path: _path + ".projectName",
|
|
69
|
+
expected: "string",
|
|
70
|
+
value: input.projectName
|
|
71
|
+
}), ("object" === typeof input.credentials && null !== input.credentials || _report(_exceptionable, {
|
|
72
|
+
path: _path + ".credentials",
|
|
73
|
+
expected: "__type",
|
|
74
|
+
value: input.credentials
|
|
75
|
+
})) && _vo1(input.credentials, _path + ".credentials", true && _exceptionable) || _report(_exceptionable, {
|
|
76
|
+
path: _path + ".credentials",
|
|
77
|
+
expected: "__type",
|
|
78
|
+
value: input.credentials
|
|
79
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.bot && null !== input.bot || _report(_exceptionable, {
|
|
80
|
+
path: _path + ".bot",
|
|
81
|
+
expected: "__type.o1",
|
|
82
|
+
value: input.bot
|
|
83
|
+
})) && _vo2(input.bot, _path + ".bot", true && _exceptionable) || _report(_exceptionable, {
|
|
84
|
+
path: _path + ".bot",
|
|
85
|
+
expected: "__type.o1",
|
|
86
|
+
value: input.bot
|
|
87
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => [("object" === typeof input.github && null !== input.github || _report(_exceptionable, {
|
|
88
|
+
path: _path + ".github",
|
|
89
|
+
expected: "__type.o2",
|
|
90
|
+
value: input.github
|
|
91
|
+
})) && _vo3(input.github, _path + ".github", true && _exceptionable) || _report(_exceptionable, {
|
|
92
|
+
path: _path + ".github",
|
|
93
|
+
expected: "__type.o2",
|
|
94
|
+
value: input.github
|
|
95
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.token || _report(_exceptionable, {
|
|
96
|
+
path: _path + ".token",
|
|
97
|
+
expected: "string",
|
|
98
|
+
value: input.token
|
|
99
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
100
|
+
if (false === __is(input)) {
|
|
101
|
+
errors = [];
|
|
102
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
103
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
104
|
+
path: _path + "",
|
|
105
|
+
expected: "inputType",
|
|
106
|
+
value: input
|
|
107
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
108
|
+
path: _path + "",
|
|
109
|
+
expected: "inputType",
|
|
110
|
+
value: input
|
|
111
|
+
}))(input, "$input", true);
|
|
112
|
+
const success = 0 === errors.length;
|
|
113
|
+
return success ? {
|
|
114
|
+
success,
|
|
115
|
+
data: input
|
|
116
|
+
} : {
|
|
117
|
+
success,
|
|
118
|
+
errors,
|
|
119
|
+
data: input
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
success: true,
|
|
124
|
+
data: input
|
|
125
|
+
};
|
|
126
|
+
}; })()(input))}`);
|
|
127
|
+
}
|
|
128
|
+
const localStorageRepository = new LocalStorageRepository_1.LocalStorageRepository();
|
|
129
|
+
const cachePath = `./tmp/cache/${input.projectName}`;
|
|
130
|
+
const localStorageCacheRepository = new LocalStorageCacheRepository_1.LocalStorageCacheRepository(localStorageRepository, cachePath);
|
|
131
|
+
const githubRepositoryParams = [
|
|
132
|
+
localStorageRepository,
|
|
133
|
+
`${cachePath}/github.com.cookies.json`,
|
|
134
|
+
input.credentials.bot.github.token,
|
|
135
|
+
];
|
|
136
|
+
const projectRepository = {
|
|
137
|
+
...new GraphqlProjectRepository_1.GraphqlProjectRepository(...githubRepositoryParams),
|
|
138
|
+
...new CheerioProjectRepository_1.CheerioProjectRepository(...githubRepositoryParams),
|
|
139
|
+
};
|
|
140
|
+
const apiV3IssueRepository = new ApiV3IssueRepository_1.ApiV3IssueRepository(...githubRepositoryParams);
|
|
141
|
+
const restIssueRepository = new RestIssueRepository_1.RestIssueRepository(...githubRepositoryParams);
|
|
142
|
+
const graphqlProjectItemRepository = new GraphqlProjectItemRepository_1.GraphqlProjectItemRepository(...githubRepositoryParams);
|
|
143
|
+
const issueRepository = new ApiV3CheerioRestIssueRepository_1.ApiV3CheerioRestIssueRepository(apiV3IssueRepository, restIssueRepository, graphqlProjectItemRepository, localStorageCacheRepository, ...githubRepositoryParams);
|
|
144
|
+
const getStoryObjectMapUseCase = new GetStoryObjectMapUseCase_1.GetStoryObjectMapUseCase(projectRepository, issueRepository);
|
|
145
|
+
return await getStoryObjectMapUseCase.run(input);
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.GetStoryObjectMapUseCaseHandler = GetStoryObjectMapUseCaseHandler;
|
|
150
|
+
//# sourceMappingURL=GetStoryObjectMapUseCaseHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetStoryObjectMapUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,4CAAoB;AACpB,sFAAmF;AACnF,0FAAuF;AACvF,wFAAqF;AACrF,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,gGAA6F;AAI7F,kDAA0C;AAC1C,0FAAuF;AACvF,gGAG2D;AAE3D,MAAa,+BAA+B;IAA5C;QACE,WAAM,GAAG,KAAK,EACZ,cAAsB,EACtB,OAAgB,EAMf,EAAE;YACH,eAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAC7B,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EACtB,CAAC,KAAiB,EAAE,EAAE;gBACpB,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACzD,CAAC;gBACD,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;oBACnB,MAAM,IAAI,KAAK,CAAC,cAAc,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBACzD,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YACnC,CAAC,CACF,CAAC;YAEF,MAAM,iBAAiB,GAAG,YAAE,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;YAClE,MAAM,KAAK,GAAY,cAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAYrD,IAAI,olBAAqB,KAAK,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,kBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAA2B,KAAK,EAAE,EAAE,CACjG,CAAC;YACJ,CAAC;YACD,MAAM,sBAAsB,GAAG,IAAI,+CAAsB,EAAE,CAAC;YAC5D,MAAM,SAAS,GAAG,eAAe,KAAK,CAAC,WAAW,EAAE,CAAC;YACrD,MAAM,2BAA2B,GAAG,IAAI,yDAA2B,CACjE,sBAAsB,EACtB,SAAS,CACV,CAAC;YACF,MAAM,sBAAsB,GAExB;gBACF,sBAAsB;gBACtB,GAAG,SAAS,0BAA0B;gBACtC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK;aACnC,CAAC;YACF,MAAM,iBAAiB,GAAG;gBACxB,GAAG,IAAI,mDAAwB,CAAC,GAAG,sBAAsB,CAAC;gBAC1D,GAAG,IAAI,mDAAwB,CAAC,GAAG,sBAAsB,CAAC;aAC3D,CAAC;YACF,MAAM,oBAAoB,GAAG,IAAI,2CAAoB,CACnD,GAAG,sBAAsB,CAC1B,CAAC;YACF,MAAM,mBAAmB,GAAG,IAAI,yCAAmB,CACjD,GAAG,sBAAsB,CAC1B,CAAC;YACF,MAAM,4BAA4B,GAAG,IAAI,2DAA4B,CACnE,GAAG,sBAAsB,CAC1B,CAAC;YACF,MAAM,eAAe,GAAG,IAAI,iEAA+B,CACzD,oBAAoB,EACpB,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,GAAG,sBAAsB,CAC1B,CAAC;YAEF,MAAM,wBAAwB,GAAG,IAAI,mDAAwB,CAC3D,iBAAiB,EACjB,eAAe,CAChB,CAAC;YAEF,OAAO,MAAM,wBAAwB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC,CAAC;IACJ,CAAC;CAAA;AAlFD,0EAkFC"}
|