github-issue-tower-defence-management 1.1.0 → 1.3.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 (134) hide show
  1. package/.github/workflows/commit-lint.yml +0 -2
  2. package/.github/workflows/empty-format-test-job.yml +28 -0
  3. package/.github/workflows/test.yml +1 -0
  4. package/CHANGELOG.md +37 -38
  5. package/bin/adapter/entry-points/cli/index.js +2 -1
  6. package/bin/adapter/entry-points/cli/index.js.map +1 -1
  7. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +140 -17
  8. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
  9. package/bin/adapter/repositories/BaseGitHubRepository.js +3 -9
  10. package/bin/adapter/repositories/BaseGitHubRepository.js.map +1 -1
  11. package/bin/adapter/repositories/GraphqlProjectRepository.js +30 -0
  12. package/bin/adapter/repositories/GraphqlProjectRepository.js.map +1 -1
  13. package/bin/adapter/repositories/LocalStorageRepository.js +6 -0
  14. package/bin/adapter/repositories/LocalStorageRepository.js.map +1 -1
  15. package/bin/adapter/repositories/SystemDateRepository.js +15 -3
  16. package/bin/adapter/repositories/SystemDateRepository.js.map +1 -1
  17. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js +69 -9
  18. package/bin/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.js.map +1 -1
  19. package/bin/adapter/repositories/issue/CheerioIssueRepository.js +28 -2
  20. package/bin/adapter/repositories/issue/CheerioIssueRepository.js.map +1 -1
  21. package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js +7 -0
  22. package/bin/adapter/repositories/issue/GraphqlProjectItemRepository.js.map +1 -1
  23. package/bin/adapter/repositories/issue/InternalGraphqlIssueRepository.js +19 -5
  24. package/bin/adapter/repositories/issue/InternalGraphqlIssueRepository.js.map +1 -1
  25. package/bin/adapter/repositories/issue/RestIssueRepository.js +1 -0
  26. package/bin/adapter/repositories/issue/RestIssueRepository.js.map +1 -1
  27. package/bin/adapter/repositories/utils.js +1 -6
  28. package/bin/adapter/repositories/utils.js.map +1 -1
  29. package/bin/domain/usecases/AnalyzeProblemByIssueUseCase.js +98 -65
  30. package/bin/domain/usecases/AnalyzeProblemByIssueUseCase.js.map +1 -1
  31. package/bin/domain/usecases/AnalyzeStoriesUseCase.js +173 -0
  32. package/bin/domain/usecases/AnalyzeStoriesUseCase.js.map +1 -0
  33. package/bin/domain/usecases/ChangeStatusLongInReviewIssueUseCase.js +37 -0
  34. package/bin/domain/usecases/ChangeStatusLongInReviewIssueUseCase.js.map +1 -0
  35. package/bin/domain/usecases/ClearDependedIssueURLUseCase.js +66 -0
  36. package/bin/domain/usecases/ClearDependedIssueURLUseCase.js.map +1 -0
  37. package/bin/domain/usecases/ClearNextActionHourUseCase.js +8 -2
  38. package/bin/domain/usecases/ClearNextActionHourUseCase.js.map +1 -1
  39. package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js +63 -0
  40. package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js.map +1 -0
  41. package/bin/domain/usecases/CreateEstimationIssueUseCase.js +100 -0
  42. package/bin/domain/usecases/CreateEstimationIssueUseCase.js.map +1 -0
  43. package/bin/domain/usecases/HandleScheduledEventUseCase.js +136 -2
  44. package/bin/domain/usecases/HandleScheduledEventUseCase.js.map +1 -1
  45. package/bin/domain/usecases/utils.js +24 -0
  46. package/bin/domain/usecases/utils.js.map +1 -0
  47. package/package.json +2 -2
  48. package/src/adapter/entry-points/cli/index.test.ts +1 -0
  49. package/src/adapter/entry-points/cli/index.ts +3 -1
  50. package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +92 -7
  51. package/src/adapter/repositories/AxiosSlackRepository.test.ts +3 -0
  52. package/src/adapter/repositories/BaseGitHubRepository.test.ts +3 -1
  53. package/src/adapter/repositories/BaseGitHubRepository.ts +3 -12
  54. package/src/adapter/repositories/GraphqlProjectRepository.test.ts +30 -1
  55. package/src/adapter/repositories/GraphqlProjectRepository.ts +41 -0
  56. package/src/adapter/repositories/LocalStorageCacheRepository.test.ts +1 -0
  57. package/src/adapter/repositories/LocalStorageRepository.ts +6 -0
  58. package/src/adapter/repositories/SystemDateRepository.ts +17 -3
  59. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.test.ts +8 -0
  60. package/src/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.ts +123 -16
  61. package/src/adapter/repositories/issue/ApiV3IssueRepository.test.ts +3 -0
  62. package/src/adapter/repositories/issue/CheerioIssueRepository.test.ts +10 -0
  63. package/src/adapter/repositories/issue/CheerioIssueRepository.ts +37 -1
  64. package/src/adapter/repositories/issue/GraphqlProjectItemRepository.test.ts +7 -1
  65. package/src/adapter/repositories/issue/GraphqlProjectItemRepository.ts +15 -0
  66. package/src/adapter/repositories/issue/InternalGraphqlIssueRepository.test.ts +7 -1
  67. package/src/adapter/repositories/issue/InternalGraphqlIssueRepository.ts +22 -5
  68. package/src/adapter/repositories/issue/RestIssueRepository.test.ts +3 -0
  69. package/src/adapter/repositories/issue/RestIssueRepository.ts +5 -2
  70. package/src/adapter/repositories/utils.test.ts +16 -1
  71. package/src/adapter/repositories/utils.ts +1 -6
  72. package/src/domain/entities/Issue.ts +4 -0
  73. package/src/domain/entities/Project.ts +21 -4
  74. package/src/domain/usecases/AnalyzeProblemByIssueUseCase.ts +151 -115
  75. package/src/domain/usecases/AnalyzeStoriesUseCase.ts +296 -0
  76. package/src/domain/usecases/CONTRIBUTING_FOR_TEST.md +254 -0
  77. package/src/domain/usecases/ChangeStatusLongInReviewIssueUseCase.test.ts +204 -0
  78. package/src/domain/usecases/ChangeStatusLongInReviewIssueUseCase.ts +57 -0
  79. package/src/domain/usecases/ClearDependedIssueURLUseCase.test.ts +840 -0
  80. package/src/domain/usecases/ClearDependedIssueURLUseCase.ts +107 -0
  81. package/src/domain/usecases/ClearNextActionHourUseCase.ts +12 -2
  82. package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.test.ts +490 -0
  83. package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts +98 -0
  84. package/src/domain/usecases/CreateEstimationIssueUseCase.ts +157 -0
  85. package/src/domain/usecases/GenerateWorkingTimeReportUseCase.test.ts +8 -0
  86. package/src/domain/usecases/HandleScheduledEventUseCase.ts +184 -2
  87. package/src/domain/usecases/adapter-interfaces/DateRepository.ts +2 -0
  88. package/src/domain/usecases/adapter-interfaces/IssueRepository.ts +13 -1
  89. package/src/domain/usecases/utils.ts +28 -0
  90. package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts +1 -1
  91. package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
  92. package/types/adapter/repositories/BaseGitHubRepository.d.ts +3 -1
  93. package/types/adapter/repositories/BaseGitHubRepository.d.ts.map +1 -1
  94. package/types/adapter/repositories/GraphqlProjectRepository.d.ts.map +1 -1
  95. package/types/adapter/repositories/LocalStorageRepository.d.ts +1 -0
  96. package/types/adapter/repositories/LocalStorageRepository.d.ts.map +1 -1
  97. package/types/adapter/repositories/SystemDateRepository.d.ts +2 -0
  98. package/types/adapter/repositories/SystemDateRepository.d.ts.map +1 -1
  99. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts +15 -5
  100. package/types/adapter/repositories/issue/ApiV3CheerioRestIssueRepository.d.ts.map +1 -1
  101. package/types/adapter/repositories/issue/CheerioIssueRepository.d.ts +7 -1
  102. package/types/adapter/repositories/issue/CheerioIssueRepository.d.ts.map +1 -1
  103. package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts +3 -0
  104. package/types/adapter/repositories/issue/GraphqlProjectItemRepository.d.ts.map +1 -1
  105. package/types/adapter/repositories/issue/InternalGraphqlIssueRepository.d.ts.map +1 -1
  106. package/types/adapter/repositories/issue/RestIssueRepository.d.ts +1 -1
  107. package/types/adapter/repositories/issue/RestIssueRepository.d.ts.map +1 -1
  108. package/types/adapter/repositories/utils.d.ts.map +1 -1
  109. package/types/domain/entities/Issue.d.ts +4 -0
  110. package/types/domain/entities/Issue.d.ts.map +1 -1
  111. package/types/domain/entities/Project.d.ts +21 -4
  112. package/types/domain/entities/Project.d.ts.map +1 -1
  113. package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts +13 -8
  114. package/types/domain/usecases/AnalyzeProblemByIssueUseCase.d.ts.map +1 -1
  115. package/types/domain/usecases/AnalyzeStoriesUseCase.d.ts +45 -0
  116. package/types/domain/usecases/AnalyzeStoriesUseCase.d.ts.map +1 -0
  117. package/types/domain/usecases/ChangeStatusLongInReviewIssueUseCase.d.ts +17 -0
  118. package/types/domain/usecases/ChangeStatusLongInReviewIssueUseCase.d.ts.map +1 -0
  119. package/types/domain/usecases/ClearDependedIssueURLUseCase.d.ts +13 -0
  120. package/types/domain/usecases/ClearDependedIssueURLUseCase.d.ts.map +1 -0
  121. package/types/domain/usecases/ClearNextActionHourUseCase.d.ts.map +1 -1
  122. package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts +20 -0
  123. package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts.map +1 -0
  124. package/types/domain/usecases/CreateEstimationIssueUseCase.d.ts +33 -0
  125. package/types/domain/usecases/CreateEstimationIssueUseCase.d.ts.map +1 -0
  126. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts +28 -2
  127. package/types/domain/usecases/HandleScheduledEventUseCase.d.ts.map +1 -1
  128. package/types/domain/usecases/adapter-interfaces/DateRepository.d.ts +2 -0
  129. package/types/domain/usecases/adapter-interfaces/DateRepository.d.ts.map +1 -1
  130. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts +4 -1
  131. package/types/domain/usecases/adapter-interfaces/IssueRepository.d.ts.map +1 -1
  132. package/types/domain/usecases/utils.d.ts +5 -0
  133. package/types/domain/usecases/utils.d.ts.map +1 -0
  134. package/types/index.d.ts +1 -1
@@ -44,11 +44,9 @@ jobs:
44
44
  with:
45
45
  exclude-branches: 'release/**, dependabot/**, project-common/**'
46
46
  loose-matching: true
47
-
48
47
  - name: Install commitlint
49
48
  run: |
50
49
  npm install --save-dev @commitlint/{config-conventional,cli}
51
-
52
50
  - name: Lint commits
53
51
  run: |
54
52
  npx commitlint --from=origin/main --to=HEAD --config ./.github/workflows/configs/commitlint.config.js
@@ -0,0 +1,28 @@
1
+ name: Empty format test
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - run: echo "test"
10
+
11
+ format:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: write
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ token: ${{ secrets.GH_TOKEN }}
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 20
22
+ - run: git pull
23
+ - run: |
24
+ npx prettier --write "**/*.{md,yaml,yml,js}" --trailing-comma all --print-width 80 --single-quote true
25
+ git --no-pager diff
26
+ - uses: stefanzweifel/git-auto-commit-action@v5
27
+ with:
28
+ commit_message: 'style: re-format / npx prettier --write "**/*.{md,yaml,yml,js}"'
@@ -22,6 +22,7 @@ jobs:
22
22
  - name: Build
23
23
  run: npm run build
24
24
 
25
+ - run: mkdir -p tmp && npx -y gh-cookie '${{ secrets.TEST_GH_USER_NAME }}' '${{ secrets.TEST_GH_USER_PASSWORD }}' '${{ secrets.TEST_GH_AUTHENTICATOR_KEY }}' > tmp/github.com.cookies.json
25
26
  - name: Run tests
26
27
  run: npm run test
27
28
  env:
package/CHANGELOG.md CHANGED
@@ -1,49 +1,48 @@
1
- # [1.1.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.0.0...v1.1.0) (2024-12-08)
1
+ # [1.3.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.2.0...v1.3.0) (2025-01-04)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * avoid to use comma for warning to keep csv format ([ab98722](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/ab987220d770101b270c20cb2482b7868a934e01))
7
- * change time to run ClearNextActionHourUseCase ([58c754e](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/58c754ecbf227694aece38746d306598957a252a))
8
- * create sheet if not exists in GoogleSpreadsheetRepository ([eed58d4](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/eed58d496556f911cee8308bfe819324a6007dad))
9
- * decrare types ([41cae9d](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/41cae9de84bd13350ae290b38c77fe0573245499))
10
- * failed to get cookie correctly ([2e21889](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/2e2188963edd5a665455f60dad2395338e962b16))
11
- * failed to get ids in GraphqlProjectItemRepository ([ca04065](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/ca04065d2742f713295f30bfba1e5d610d292955))
12
- * failed to get project number correctly in GraphqlProjectRepository ([d888325](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/d8883255efd3234015d5e8cba08987fdf4f3d3d2))
13
- * failed to get status by classic view ([1d9f478](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/1d9f4786372bc945cef2be9dd74e6d725eff655b))
14
- * failed to load data from file ([e02931c](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/e02931c18dfb716038e63571a31a894aec426149))
15
- * failed to render label on issue ([dffa281](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/dffa2813966f4046c14b87dff6d69f65813ad5c4))
16
- * failed to save file if parent dir is not exists ([ab590e1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/ab590e1469f9b5012fa916b03702924c93f6de60))
17
- * get cookie from credential ([133416f](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/133416f4743dab56beeab8f9a5226a6c865f56f9))
18
- * hide log from axios ([b6cf9b3](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b6cf9b3194168d51465f16b40a8709879b22bd61))
19
- * remove decimals before duration calcuration in issueTimelineUrilts ([4d2654f](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/4d2654fddbc26600449708a4f44c4d4c7fc3b1b1))
20
- * remove octokit to avoid ems error ([cbf30d7](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/cbf30d7549b1fae247d8ab28e334669261e851a2))
21
- * run for every minutes ([b7ae179](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b7ae179e62de563a32bcbc43d316161005267e34))
22
- * save raw working report data to spredsheet at once ([9eb89f9](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9eb89f9db7b517171779bb46fef0e7b61c176860))
23
- * separate process pr or issue to get timeline ([6641705](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/6641705f8e0478b86a8cc1316152c727fac15ab5))
24
- * set datetime after collecting issues ([dd85d6c](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/dd85d6c6d99a8e4bae4387ba9a28375388595366))
25
- * sleep to avoid 429 on slack api ([98aa47c](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/98aa47cd5fb1a320421c1dac1e523493adf1a68c))
26
- * updated wrong lastExecutionDate ([c0c900a](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/c0c900a5eaaab5e1e34a9b225c540dcc1ae83d87))
27
- * wait 2sec after created issue ([b4bd107](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b4bd107bb74025ff322ef495cf7fdc6179a5fc63))
28
- * wait 2sec after upload image in AxiusSlackRepository ([06ff9f5](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/06ff9f569246d21e3b07727467066acdf32874da))
29
- * wait 5sec after change story ([721bdc1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/721bdc1f786d83378354aa52fd9e529469147bc4))
30
- * wait 5sec to create announcement issue ([1d6c7b6](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/1d6c7b67bc622aeab06c9561469ad7b8a5f50637))
31
- * wait 5sec to create working time report issue ([664c503](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/664c50310b0a11a2e08ad303ba6c3238efaf1f97))
32
- * wrong updateStory parameter in ApiV3CheerioRestIssueRepository ([46d3f74](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/46d3f7495120e6d40fc9a34a906ad9a844a8a9f5))
6
+ * avoid to create issues on checkbox only issue number ([02422e2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/02422e269b4c5e530acf931ba12278dcf65e40d4))
7
+ * calcuration of target next action hour ([5464b7a](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/5464b7aaa40d39f72e1daee10121bd651bab876a))
8
+ * retry if internal graphql api returns error ([3015a52](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/3015a527b2c4b00f4ed1165c520ace75043629d9))
9
+ * run with cache to clear next action hour ([0253421](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/0253421a97cf26dc8e14302fc50df01c66f31f69))
10
+ * trim checkbox text before check issue should be created ([8cabea2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/8cabea210bc4935a2f69b63325110ed35abe5669))
11
+ * update issue body after a issue created everytime ([87d8baf](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/87d8bafadd7bc73c7ec65dd73806d7d7665caef5))
33
12
 
34
13
 
35
14
  ### Features
36
15
 
37
- * add raw log to spreadsheet in GenerateWorkingTimeReportUseCase ([8f3bda7](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/8f3bda7585e9e6ab0afa77534eba45faf0029c4b))
38
- * export function interface ([0ec4a28](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/0ec4a28e84215b37c3aa3a2306eab71f9e917153))
39
- * implement task for scheduler ([6415aad](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/6415aad41d754a95f0167a463544b2776ceb55a9))
40
- * report via issue when error happen in GenerateWorkingTimeReportUseCase ([464fd36](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/464fd3604e658b303bf82b93ed22c496d9cf303d))
41
- * show labels in daily report ([f8ec5d3](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/f8ec5d3b0ae3b8ef636cbe86864cd5e0e53c67d8))
42
- * use cache if there is for issues ([9a6ec9d](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9a6ec9dadfdcecbc33e28745889302f949bcef29))
43
- * use clearNextActionHourUseCase and analyzeProblemByIssueUseCase ([9046ed7](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9046ed7c8235ac4f69f155363a762ac6370747a6))
44
- * use codeblock for total time in working report ([b51f43a](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b51f43a495b0918faa6bc5b6d09c54be8a5ecaf4))
16
+ * add verbose option ([0ac6b07](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/0ac6b071bbbc33fae62ecc9ae908f9a5ea86a5f7))
17
+ * remove next action date if it is past date ([a887274](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/a88727460e81c16774a322eb02c6a7c17a8038f3))
18
+ * show table for story summary ([703e573](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/703e57304da6593a97f4e92253254f6ef81fabb2))
19
+ * use ConvertCheckboxToIssueInStoryIssueUseCase ([7725461](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/7725461e7f043b5196a350975447cfbfd5af6ed6))
45
20
 
21
+ # [1.2.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.1.0...v1.2.0) (2025-01-02)
46
22
 
47
- ### Performance Improvements
48
23
 
49
- * get timeline and issue data from 1 request in CheerioIssueRepository ([d61c35c](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/d61c35c41505d51387400ac1b15436bd2f0790fd))
24
+ ### Bug Fixes
25
+
26
+ * encodeURI for % and & ([d4f1a2e](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/d4f1a2ea4e67b31b14a10ed866d6ea6aef5f133f))
27
+ * failed to get completion date and dependign issue field ([8314a7c](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/8314a7c61e5a549370fa96554be1e1be9d275890))
28
+ * failed to get id when get issue data only 1 ([2bacf46](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/2bacf4677caca918dda7e654d9d944879848611f))
29
+ * failed to normalize field name ([9600dd9](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9600dd9dd243a459bf123446898a4dee171e3fe1))
30
+ * use red if story color is pink ([64e2dd6](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/64e2dd6a95e00031fe6776456fbc4052128d600e))
31
+
32
+
33
+ ### Features
34
+
35
+ * add formatDateWityDayOfWeek in SystemDatetimeRepository ([18e4d55](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/18e4d559e802be47e54005f6488d6f4f3747a6bc))
36
+ * add new field to issue of dependedIssueUrlSeparatedByComma, completationDate ([bd7c3cc](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/bd7c3cc368c71de7287823baa0c0d0006bd8256e))
37
+ * add remove to LocalStorageRepository ([cb6320e](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/cb6320eab34caeeafd6cf5a661d6784a8bb7a299))
38
+ * add unhandled story to summary ([fa5b622](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/fa5b622b2eafcc70e78a8755bfb909993c87e552))
39
+ * analyze stories at 7:00am ([b91dd0a](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b91dd0afbbcd782a5d19080c17da19d7f356b117))
40
+ * configure creds in yaml ([5d5dcd4](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/5d5dcd411f93758e8122f629d14c38215cdbf7da))
41
+ * ignore pr when check in progress ([9aececc](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/9aececc82dfadda71182fcc18e615ef78bf8a696))
42
+ * refreshCookie before collecting data ([85f8189](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/85f8189042b30b1f7393e852e81434a5fb50499b))
43
+ * remove mention from working timeline ([87b6958](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/87b69581811167c4966e9fe6892bc21aa81f8785))
44
+ * retry if project is not set ([12cf0be](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/12cf0bed4a2e394c048d6d6e63a4b900e020e59a))
45
+ * run clearDependedIssueURLUseCase ([b4505fc](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/b4505fcb81cdee4fd9283941e5f27a7425bf64f1))
46
+ * show flowchart ([44b2a02](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/44b2a0259ef72b650e19a894b8170346559c7722))
47
+ * skip issue creation if no vioration ([2267263](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/22672632609b4f06f0b516e98084674439431ac9))
48
+ * use createEstimationIssueUseCase ([2cbb9db](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/2cbb9db3c09a3ca37b4d273c55adb23d04fff40c))
@@ -9,6 +9,7 @@ program
9
9
  .description('CLI tool for GitHub Issue Tower Defence Management')
10
10
  .requiredOption('-t, --trigger <type>', 'Trigger type: issue or schedule', /^(issue|schedule)$/i)
11
11
  .requiredOption('-c, --config <path>', 'Path to config YAML file')
12
+ .option('-v, --verbose', 'Verbose output')
12
13
  .option('-i, --issue <url>', 'GitHub Issue URL')
13
14
  .action(async (options) => {
14
15
  if (options.trigger === 'issue' && !options.issue) {
@@ -17,7 +18,7 @@ program
17
18
  }
18
19
  if (options.trigger === 'schedule') {
19
20
  const handler = new HandleScheduledEventUseCaseHandler_1.HandleScheduledEventUseCaseHandler();
20
- await handler.handle(options.config);
21
+ await handler.handle(options.config, options.verbose);
21
22
  }
22
23
  });
23
24
  if (process.argv) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,uGAAoG;AAEpG,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAQ9B,OAAO;KACJ,IAAI,CAAC,uCAAuC,CAAC;KAC7C,WAAW,CAAC,oDAAoD,CAAC;KACjE,cAAc,CACb,sBAAsB,EACtB,iCAAiC,EACjC,qBAAqB,CACtB;KACA,cAAc,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;KACjE,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;KAC/C,MAAM,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE;IACjC,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,IAAI,uEAAkC,EAAE,CAAC;QACzD,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,uGAAoG;AAEpG,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAS9B,OAAO;KACJ,IAAI,CAAC,uCAAuC,CAAC;KAC7C,WAAW,CAAC,oDAAoD,CAAC;KACjE,cAAc,CACb,sBAAsB,EACtB,iCAAiC,EACjC,qBAAqB,CACtB;KACA,cAAc,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;KACjE,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC;KACzC,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;KAC/C,MAAM,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE;IACjC,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,IAAI,uEAAkC,EAAE,CAAC;QACzD,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
@@ -24,13 +24,31 @@ const SetWorkflowManagementIssueToStoryUseCase_1 = require("../../../domain/usec
24
24
  const InternalGraphqlIssueRepository_1 = require("../../repositories/issue/InternalGraphqlIssueRepository");
25
25
  const ClearNextActionHourUseCase_1 = require("../../../domain/usecases/ClearNextActionHourUseCase");
26
26
  const AnalyzeProblemByIssueUseCase_1 = require("../../../domain/usecases/AnalyzeProblemByIssueUseCase");
27
+ const AnalyzeStoriesUseCase_1 = require("../../../domain/usecases/AnalyzeStoriesUseCase");
28
+ const ClearDependedIssueURLUseCase_1 = require("../../../domain/usecases/ClearDependedIssueURLUseCase");
29
+ const CreateEstimationIssueUseCase_1 = require("../../../domain/usecases/CreateEstimationIssueUseCase");
30
+ const axios_1 = __importDefault(require("axios"));
31
+ const ConvertCheckboxToIssueInStoryIssueUseCase_1 = require("../../../domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase");
27
32
  class HandleScheduledEventUseCaseHandler {
28
33
  constructor() {
29
- this.handle = async (configFilePath) => {
34
+ this.handle = async (configFilePath, verbose) => {
35
+ axios_1.default.interceptors.response.use((response) => response, (error) => {
36
+ if (verbose) {
37
+ throw new Error(`API Error: ${JSON.stringify(error)}`);
38
+ }
39
+ if (error.response) {
40
+ throw new Error(`API Error: ${error.response.status}`);
41
+ }
42
+ throw new Error('Network Error');
43
+ });
30
44
  const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
31
45
  const input = yaml_1.default.parse(configFileContent);
32
- if (!(() => { const $io0 = input => "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && $io1(input.workingReport)); const $io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && (undefined === input.warningThresholdHour || "number" === typeof input.warningThresholdHour) && "string" === typeof input.spreadsheetUrl && (undefined === input.reportIssueTemplate || "string" === typeof input.reportIssueTemplate) && (Array.isArray(input.reportIssueLabels) && input.reportIssueLabels.every(elem => "string" === typeof elem)); return input => "object" === typeof input && null !== input && $io0(input); })()(input)) {
33
- throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const $io0 = input => "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && $io1(input.workingReport)); const $io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && (undefined === input.warningThresholdHour || "number" === typeof input.warningThresholdHour) && "string" === typeof input.spreadsheetUrl && (undefined === input.reportIssueTemplate || "string" === typeof input.reportIssueTemplate) && (Array.isArray(input.reportIssueLabels) && input.reportIssueLabels.every(elem => "string" === typeof elem)); const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.org || $report(_exceptionable, {
46
+ if (!(() => { const $io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && $io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "string" === typeof input.disabledStatus && ("object" === typeof input.credentials && null !== input.credentials && $io2(input.credentials)); const $io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && (undefined === input.warningThresholdHour || "number" === typeof input.warningThresholdHour) && "string" === typeof input.spreadsheetUrl && (undefined === input.reportIssueTemplate || "string" === typeof input.reportIssueTemplate) && (Array.isArray(input.reportIssueLabels) && input.reportIssueLabels.every(elem => "string" === typeof elem)); const $io2 = input => "object" === typeof input.manager && null !== input.manager && $io3(input.manager) && ("object" === typeof input.bot && null !== input.bot && $io7(input.bot)); const $io3 = input => "object" === typeof input.github && null !== input.github && $io4(input.github) && ("object" === typeof input.slack && null !== input.slack && $io5(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && $io6(input.googleServiceAccount)); const $io4 = input => "string" === typeof input.token; const $io5 = input => "string" === typeof input.userToken; const $io6 = input => "string" === typeof input.serviceAccountKey; const $io7 = input => "object" === typeof input.github && null !== input.github && $io8(input.github); const $io8 = input => "string" === typeof input.token && "string" === typeof input.name && "string" === typeof input.password && "string" === typeof input.authenticatorKey; return input => "object" === typeof input && null !== input && $io0(input); })()(input)) {
47
+ throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const $io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && $io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "string" === typeof input.disabledStatus && ("object" === typeof input.credentials && null !== input.credentials && $io2(input.credentials)); const $io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && (undefined === input.warningThresholdHour || "number" === typeof input.warningThresholdHour) && "string" === typeof input.spreadsheetUrl && (undefined === input.reportIssueTemplate || "string" === typeof input.reportIssueTemplate) && (Array.isArray(input.reportIssueLabels) && input.reportIssueLabels.every(elem => "string" === typeof elem)); const $io2 = input => "object" === typeof input.manager && null !== input.manager && $io3(input.manager) && ("object" === typeof input.bot && null !== input.bot && $io7(input.bot)); const $io3 = input => "object" === typeof input.github && null !== input.github && $io4(input.github) && ("object" === typeof input.slack && null !== input.slack && $io5(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && $io6(input.googleServiceAccount)); const $io4 = input => "string" === typeof input.token; const $io5 = input => "string" === typeof input.userToken; const $io6 = input => "string" === typeof input.serviceAccountKey; const $io7 = input => "object" === typeof input.github && null !== input.github && $io8(input.github); const $io8 = input => "string" === typeof input.token && "string" === typeof input.name && "string" === typeof input.password && "string" === typeof input.authenticatorKey; const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectName || $report(_exceptionable, {
48
+ path: _path + ".projectName",
49
+ expected: "string",
50
+ value: input.projectName
51
+ }), "string" === typeof input.org || $report(_exceptionable, {
34
52
  path: _path + ".org",
35
53
  expected: "string",
36
54
  value: input.org
@@ -44,12 +62,28 @@ class HandleScheduledEventUseCaseHandler {
44
62
  value: input.manager
45
63
  }), ("object" === typeof input.workingReport && null !== input.workingReport || $report(_exceptionable, {
46
64
  path: _path + ".workingReport",
47
- expected: "__type.o1",
65
+ expected: "__type",
48
66
  value: input.workingReport
49
67
  })) && $vo1(input.workingReport, _path + ".workingReport", true && _exceptionable) || $report(_exceptionable, {
50
68
  path: _path + ".workingReport",
51
- expected: "__type.o1",
69
+ expected: "__type",
52
70
  value: input.workingReport
71
+ }), "string" === typeof input.urlOfStoryView || $report(_exceptionable, {
72
+ path: _path + ".urlOfStoryView",
73
+ expected: "string",
74
+ value: input.urlOfStoryView
75
+ }), "string" === typeof input.disabledStatus || $report(_exceptionable, {
76
+ path: _path + ".disabledStatus",
77
+ expected: "string",
78
+ value: input.disabledStatus
79
+ }), ("object" === typeof input.credentials && null !== input.credentials || $report(_exceptionable, {
80
+ path: _path + ".credentials",
81
+ expected: "__type.o1",
82
+ value: input.credentials
83
+ })) && $vo2(input.credentials, _path + ".credentials", true && _exceptionable) || $report(_exceptionable, {
84
+ path: _path + ".credentials",
85
+ expected: "__type.o1",
86
+ value: input.credentials
53
87
  })].every(flag => flag); const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.repo || $report(_exceptionable, {
54
88
  path: _path + ".repo",
55
89
  expected: "string",
@@ -90,17 +124,93 @@ class HandleScheduledEventUseCaseHandler {
90
124
  path: _path + ".reportIssueLabels",
91
125
  expected: "Array<string>",
92
126
  value: input.reportIssueLabels
127
+ })].every(flag => flag); const $vo2 = (input, _path, _exceptionable = true) => [("object" === typeof input.manager && null !== input.manager || $report(_exceptionable, {
128
+ path: _path + ".manager",
129
+ expected: "__type.o2",
130
+ value: input.manager
131
+ })) && $vo3(input.manager, _path + ".manager", true && _exceptionable) || $report(_exceptionable, {
132
+ path: _path + ".manager",
133
+ expected: "__type.o2",
134
+ value: input.manager
135
+ }), ("object" === typeof input.bot && null !== input.bot || $report(_exceptionable, {
136
+ path: _path + ".bot",
137
+ expected: "__type.o6",
138
+ value: input.bot
139
+ })) && $vo7(input.bot, _path + ".bot", true && _exceptionable) || $report(_exceptionable, {
140
+ path: _path + ".bot",
141
+ expected: "__type.o6",
142
+ value: input.bot
143
+ })].every(flag => flag); const $vo3 = (input, _path, _exceptionable = true) => [("object" === typeof input.github && null !== input.github || $report(_exceptionable, {
144
+ path: _path + ".github",
145
+ expected: "__type.o3",
146
+ value: input.github
147
+ })) && $vo4(input.github, _path + ".github", true && _exceptionable) || $report(_exceptionable, {
148
+ path: _path + ".github",
149
+ expected: "__type.o3",
150
+ value: input.github
151
+ }), ("object" === typeof input.slack && null !== input.slack || $report(_exceptionable, {
152
+ path: _path + ".slack",
153
+ expected: "__type.o4",
154
+ value: input.slack
155
+ })) && $vo5(input.slack, _path + ".slack", true && _exceptionable) || $report(_exceptionable, {
156
+ path: _path + ".slack",
157
+ expected: "__type.o4",
158
+ value: input.slack
159
+ }), ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount || $report(_exceptionable, {
160
+ path: _path + ".googleServiceAccount",
161
+ expected: "__type.o5",
162
+ value: input.googleServiceAccount
163
+ })) && $vo6(input.googleServiceAccount, _path + ".googleServiceAccount", true && _exceptionable) || $report(_exceptionable, {
164
+ path: _path + ".googleServiceAccount",
165
+ expected: "__type.o5",
166
+ value: input.googleServiceAccount
167
+ })].every(flag => flag); const $vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.token || $report(_exceptionable, {
168
+ path: _path + ".token",
169
+ expected: "string",
170
+ value: input.token
171
+ })].every(flag => flag); const $vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.userToken || $report(_exceptionable, {
172
+ path: _path + ".userToken",
173
+ expected: "string",
174
+ value: input.userToken
175
+ })].every(flag => flag); const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.serviceAccountKey || $report(_exceptionable, {
176
+ path: _path + ".serviceAccountKey",
177
+ expected: "string",
178
+ value: input.serviceAccountKey
179
+ })].every(flag => flag); const $vo7 = (input, _path, _exceptionable = true) => [("object" === typeof input.github && null !== input.github || $report(_exceptionable, {
180
+ path: _path + ".github",
181
+ expected: "__type.o7",
182
+ value: input.github
183
+ })) && $vo8(input.github, _path + ".github", true && _exceptionable) || $report(_exceptionable, {
184
+ path: _path + ".github",
185
+ expected: "__type.o7",
186
+ value: input.github
187
+ })].every(flag => flag); const $vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.token || $report(_exceptionable, {
188
+ path: _path + ".token",
189
+ expected: "string",
190
+ value: input.token
191
+ }), "string" === typeof input.name || $report(_exceptionable, {
192
+ path: _path + ".name",
193
+ expected: "string",
194
+ value: input.name
195
+ }), "string" === typeof input.password || $report(_exceptionable, {
196
+ path: _path + ".password",
197
+ expected: "string",
198
+ value: input.password
199
+ }), "string" === typeof input.authenticatorKey || $report(_exceptionable, {
200
+ path: _path + ".authenticatorKey",
201
+ expected: "string",
202
+ value: input.authenticatorKey
93
203
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && $io0(input); let errors; let $report; return input => {
94
204
  if (false === __is(input)) {
95
205
  errors = [];
96
206
  $report = typia_1.default.validate.report(errors);
97
207
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $report(true, {
98
208
  path: _path + "",
99
- expected: "__type",
209
+ expected: "inputType",
100
210
  value: input
101
211
  })) && $vo0(input, _path + "", true) || $report(true, {
102
212
  path: _path + "",
103
- expected: "__type",
213
+ expected: "inputType",
104
214
  value: input
105
215
  }))(input, "$input", true);
106
216
  const success = 0 === errors.length;
@@ -119,21 +229,34 @@ class HandleScheduledEventUseCaseHandler {
119
229
  }
120
230
  const systemDateRepository = new SystemDateRepository_1.SystemDateRepository();
121
231
  const localStorageRepository = new LocalStorageRepository_1.LocalStorageRepository();
122
- const googleSpreadsheetRepository = new GoogleSpreadsheetRepository_1.GoogleSpreadsheetRepository(localStorageRepository);
123
- const localStorageCacheRepository = new LocalStorageCacheRepository_1.LocalStorageCacheRepository(localStorageRepository);
124
- const projectRepository = new GraphqlProjectRepository_1.GraphqlProjectRepository();
125
- const apiV3IssueRepository = new ApiV3IssueRepository_1.ApiV3IssueRepository();
126
- const internalGraphqlIssueRepository = new InternalGraphqlIssueRepository_1.InternalGraphqlIssueRepository();
127
- const cheerioIssueRepository = new CheerioIssueRepository_1.CheerioIssueRepository(internalGraphqlIssueRepository);
128
- const restIssueRepository = new RestIssueRepository_1.RestIssueRepository();
129
- const graphqlProjectItemRepository = new GraphqlProjectItemRepository_1.GraphqlProjectItemRepository();
130
- const issueRepository = new ApiV3CheerioRestIssueRepository_1.ApiV3CheerioRestIssueRepository(apiV3IssueRepository, cheerioIssueRepository, restIssueRepository, graphqlProjectItemRepository, localStorageCacheRepository);
232
+ const googleSpreadsheetRepository = new GoogleSpreadsheetRepository_1.GoogleSpreadsheetRepository(localStorageRepository, input.credentials.manager.googleServiceAccount.serviceAccountKey);
233
+ const cachePath = `./tmp/cache/${input.projectName}`;
234
+ const localStorageCacheRepository = new LocalStorageCacheRepository_1.LocalStorageCacheRepository(localStorageRepository, cachePath);
235
+ const githubRepositoryParams = [
236
+ localStorageRepository,
237
+ `${cachePath}/github.com.cookies.json`,
238
+ input.credentials.bot.github.token,
239
+ input.credentials.bot.github.name,
240
+ input.credentials.bot.github.password,
241
+ input.credentials.bot.github.authenticatorKey,
242
+ ];
243
+ const projectRepository = new GraphqlProjectRepository_1.GraphqlProjectRepository(...githubRepositoryParams);
244
+ const apiV3IssueRepository = new ApiV3IssueRepository_1.ApiV3IssueRepository(...githubRepositoryParams);
245
+ const internalGraphqlIssueRepository = new InternalGraphqlIssueRepository_1.InternalGraphqlIssueRepository(...githubRepositoryParams);
246
+ const cheerioIssueRepository = new CheerioIssueRepository_1.CheerioIssueRepository(internalGraphqlIssueRepository, ...githubRepositoryParams);
247
+ const restIssueRepository = new RestIssueRepository_1.RestIssueRepository(...githubRepositoryParams);
248
+ const graphqlProjectItemRepository = new GraphqlProjectItemRepository_1.GraphqlProjectItemRepository(...githubRepositoryParams);
249
+ const issueRepository = new ApiV3CheerioRestIssueRepository_1.ApiV3CheerioRestIssueRepository(apiV3IssueRepository, cheerioIssueRepository, restIssueRepository, graphqlProjectItemRepository, localStorageCacheRepository, ...githubRepositoryParams);
131
250
  const generateWorkingTimeReportUseCase = new GenerateWorkingTimeReportUseCase_1.GenerateWorkingTimeReportUseCase(issueRepository, googleSpreadsheetRepository, systemDateRepository);
132
251
  const actionAnnouncement = new ActionAnnouncementUseCase_1.ActionAnnouncementUseCase(issueRepository);
133
252
  const setWorkflowManagementIssueToStoryUseCase = new SetWorkflowManagementIssueToStoryUseCase_1.SetWorkflowManagementIssueToStoryUseCase(issueRepository);
134
253
  const clearNextActionHourUseCase = new ClearNextActionHourUseCase_1.ClearNextActionHourUseCase(issueRepository);
135
254
  const analyzeProblemByIssueUseCase = new AnalyzeProblemByIssueUseCase_1.AnalyzeProblemByIssueUseCase(issueRepository, systemDateRepository);
136
- const handleScheduledEventUseCase = new HandleScheduledEventUseCase_1.HandleScheduledEventUseCase(generateWorkingTimeReportUseCase, actionAnnouncement, setWorkflowManagementIssueToStoryUseCase, clearNextActionHourUseCase, analyzeProblemByIssueUseCase, systemDateRepository, googleSpreadsheetRepository, projectRepository, issueRepository);
255
+ const analyzeStoriesUseCase = new AnalyzeStoriesUseCase_1.AnalyzeStoriesUseCase(issueRepository, systemDateRepository);
256
+ const clearDependedIssueURLUseCase = new ClearDependedIssueURLUseCase_1.ClearDependedIssueURLUseCase(issueRepository);
257
+ const createEstimationIssueUseCase = new CreateEstimationIssueUseCase_1.CreateEstimationIssueUseCase(issueRepository, systemDateRepository);
258
+ const convertCheckboxToIssueInStoryIssueUseCase = new ConvertCheckboxToIssueInStoryIssueUseCase_1.ConvertCheckboxToIssueInStoryIssueUseCase(issueRepository);
259
+ const handleScheduledEventUseCase = new HandleScheduledEventUseCase_1.HandleScheduledEventUseCase(generateWorkingTimeReportUseCase, actionAnnouncement, setWorkflowManagementIssueToStoryUseCase, clearNextActionHourUseCase, analyzeProblemByIssueUseCase, analyzeStoriesUseCase, clearDependedIssueURLUseCase, createEstimationIssueUseCase, convertCheckboxToIssueInStoryIssueUseCase, systemDateRepository, googleSpreadsheetRepository, projectRepository, issueRepository);
137
260
  return await handleScheduledEventUseCase.run(input);
138
261
  };
139
262
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,4CAAoB;AACpB,kFAA+E;AAC/E,sFAAmF;AACnF,gGAA6F;AAC7F,0FAAuF;AACvF,wFAAqF;AACrF,4FAAyF;AACzF,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,gHAA6G;AAC7G,sGAAmG;AACnG,gGAA6F;AAC7F,kGAA+F;AAC/F,gIAA6H;AAC7H,4GAAyG;AACzG,oGAAiG;AACjG,wGAAqG;AAIrG,MAAa,kCAAkC;IAA/C;QACE,WAAM,GAAG,KAAK,EACZ,cAAsB,EAMrB,EAAE;YACH,MAAM,iBAAiB,GAAG,YAAE,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;YAClE,MAAM,KAAK,GAAY,cAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAErD,IAAI,izBAAqB,KAAK,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,kBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAAC,eAAK,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;wBAAY,KAAK,EAAE,EAAE,CACjG,CAAC;YACJ,CAAC;YAED,MAAM,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;YACxD,MAAM,sBAAsB,GAAG,IAAI,+CAAsB,EAAE,CAAC;YAC5D,MAAM,2BAA2B,GAAG,IAAI,yDAA2B,CACjE,sBAAsB,CACvB,CAAC;YACF,MAAM,2BAA2B,GAAG,IAAI,yDAA2B,CACjE,sBAAsB,CACvB,CAAC;YACF,MAAM,iBAAiB,GAAG,IAAI,mDAAwB,EAAE,CAAC;YACzD,MAAM,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;YACxD,MAAM,8BAA8B,GAAG,IAAI,+DAA8B,EAAE,CAAC;YAC5E,MAAM,sBAAsB,GAAG,IAAI,+CAAsB,CACvD,8BAA8B,CAC/B,CAAC;YACF,MAAM,mBAAmB,GAAG,IAAI,yCAAmB,EAAE,CAAC;YACtD,MAAM,4BAA4B,GAAG,IAAI,2DAA4B,EAAE,CAAC;YACxE,MAAM,eAAe,GAAG,IAAI,iEAA+B,CACzD,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,CAC5B,CAAC;YACF,MAAM,gCAAgC,GACpC,IAAI,mEAAgC,CAClC,eAAe,EACf,2BAA2B,EAC3B,oBAAoB,CACrB,CAAC;YACJ,MAAM,kBAAkB,GAAG,IAAI,qDAAyB,CAAC,eAAe,CAAC,CAAC;YAC1E,MAAM,wCAAwC,GAC5C,IAAI,mFAAwC,CAAC,eAAe,CAAC,CAAC;YAChE,MAAM,0BAA0B,GAAG,IAAI,uDAA0B,CAC/D,eAAe,CAChB,CAAC;YACF,MAAM,4BAA4B,GAAG,IAAI,2DAA4B,CACnE,eAAe,EACf,oBAAoB,CACrB,CAAC;YACF,MAAM,2BAA2B,GAAG,IAAI,yDAA2B,CACjE,gCAAgC,EAChC,kBAAkB,EAClB,wCAAwC,EACxC,0BAA0B,EAC1B,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,CAChB,CAAC;YAEF,OAAO,MAAM,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC;CAAA;AAvED,gFAuEC"}
1
+ {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;AAAA,g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EACjB,eAAe,CAChB,CAAC;YAEF,OAAO,MAAM,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC;CAAA;AAtJD,gFAsJC"}
@@ -6,18 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BaseGitHubRepository = void 0;
7
7
  const fs_1 = require("fs");
8
8
  const cookie_1 = require("cookie");
9
- const axios_1 = __importDefault(require("axios"));
10
9
  const gh_cookie_1 = require("gh-cookie");
11
10
  const fs_2 = __importDefault(require("fs"));
12
- axios_1.default.interceptors.response.use((response) => response, (error) => {
13
- if (error.response) {
14
- throw new Error(`API Error: ${error.response.status}`);
15
- }
16
- throw new Error('Network Error');
17
- });
18
11
  class BaseGitHubRepository {
19
- constructor(jsonFilePath = './tmp/github.com.cookies.json', ghToken = process.env.GH_TOKEN || 'dummy', ghUserName = process.env.GH_USER_NAME, ghUserPassword = process.env.GH_USER_PASSWORD, ghAuthenticatorKey = process.env
12
+ constructor(localStorageRepository, jsonFilePath = './tmp/github.com.cookies.json', ghToken = process.env.GH_TOKEN || 'dummy', ghUserName = process.env.GH_USER_NAME, ghUserPassword = process.env.GH_USER_PASSWORD, ghAuthenticatorKey = process.env
20
13
  .GH_AUTHENTICATOR_KEY) {
14
+ this.localStorageRepository = localStorageRepository;
21
15
  this.jsonFilePath = jsonFilePath;
22
16
  this.ghToken = ghToken;
23
17
  this.ghUserName = ghUserName;
@@ -71,7 +65,7 @@ class BaseGitHubRepository {
71
65
  throw new Error('No cookie file and no credentials provided');
72
66
  }
73
67
  const cookie = await (0, gh_cookie_1.getCookieContent)(this.ghUserName, this.ghUserPassword, this.ghAuthenticatorKey);
74
- await fs_1.promises.writeFile(this.jsonFilePath, cookie);
68
+ this.localStorageRepository.write(this.jsonFilePath, cookie);
75
69
  }
76
70
  const data = await fs_1.promises.readFile(this.jsonFilePath, {
77
71
  encoding: 'utf-8',
@@ -1 +1 @@
1
- {"version":3,"file":"Ba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BACnC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;gBACrE,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;aAC1B,CAAC,CACH;iBACA,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QArIA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;CAqIF;AAjJD,oDAiJC"}
@@ -124,12 +124,28 @@ class GraphqlProjectRepository extends BaseGitHubRepository_1.BaseGitHubReposito
124
124
  }
125
125
  const nextActionDate = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name) === 'nextactiondate');
126
126
  const nextActionHour = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name) === 'nextactionhour');
127
+ const status = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name) === 'status');
128
+ if (!status) {
129
+ throw new Error('status field is not found');
130
+ }
127
131
  const story = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name) === 'story');
128
132
  const workflowManagementStory = story?.options.find((option) => (0, utils_1.normalizeFieldName)(option.name).includes('workflowmanagement'));
129
133
  const remainignEstimationMinutes = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name) === 'remainingestimationminutes');
134
+ const dependedIssueUrlSeparatedByComma = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name).startsWith('dependedissueurlseparatedbycomma'));
135
+ const completionDate50PercentConfidence = project.fields.nodes.find((field) => (0, utils_1.normalizeFieldName)(field.name).startsWith('completiondate'));
130
136
  return {
131
137
  id: project.id,
132
138
  name: project.title,
139
+ status: {
140
+ name: status.name,
141
+ fieldId: status.id,
142
+ statuses: status.options.map((option) => ({
143
+ id: option.id,
144
+ name: option.name,
145
+ color: option.color,
146
+ description: option.description,
147
+ })),
148
+ },
133
149
  nextActionDate: nextActionDate
134
150
  ? {
135
151
  name: nextActionDate.name,
@@ -149,6 +165,8 @@ class GraphqlProjectRepository extends BaseGitHubRepository_1.BaseGitHubReposito
149
165
  stories: story.options.map((option) => ({
150
166
  id: option.id,
151
167
  name: option.name,
168
+ color: option.color,
169
+ description: option.description,
152
170
  })),
153
171
  workflowManagementStory,
154
172
  }
@@ -159,6 +177,18 @@ class GraphqlProjectRepository extends BaseGitHubRepository_1.BaseGitHubReposito
159
177
  fieldId: remainignEstimationMinutes.id,
160
178
  }
161
179
  : null,
180
+ dependedIssueUrlSeparatedByComma: dependedIssueUrlSeparatedByComma
181
+ ? {
182
+ name: dependedIssueUrlSeparatedByComma.name,
183
+ fieldId: dependedIssueUrlSeparatedByComma.id,
184
+ }
185
+ : null,
186
+ completionDate50PercentConfidence: completionDate50PercentConfidence
187
+ ? {
188
+ name: completionDate50PercentConfidence.name,
189
+ fieldId: completionDate50PercentConfidence.id,
190
+ }
191
+ : null,
162
192
  };
163
193
  };
164
194
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GraphqlProjectRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/GraphqlProjectRepository.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iEAA8D;AAG9D,mCAA6C;AAE7C,MAAa,wBACX,SAAQ,2CAAoB;IAD9B;;QAIE,0BAAqB,GAAG,CACtB,UAAkB,EAIlB,EAAE;YACF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;YAChC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACt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B,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAC1D,CAAC,KAAK,EAAE,EAAE,CACR,IAAA,0BAAkB,EAAC,KAAK,CAAC,IAAI,CAAC,KAAK,4BAA4B,CAClE,CAAC;YACF,OAAO;gBACL,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,KAAK;gBACnB,cAAc,EAAE,cAAc;oBAC5B,CAAC,CAAC;wBACE,IAAI,EAAE,cAAc,CAAC,IAAI;wBACzB,OAAO,EAAE,cAAc,CAAC,EAAE;qBAC3B;oBACH,CAAC,CAAC,IAAI;gBACR,cAAc,EAAE,cAAc;oBAC5B,CAAC,CAAC;wBACE,IAAI,EAAE,cAAc,CAAC,IAAI;wBACzB,OAAO,EAAE,cAAc,CAAC,EAAE;qBAC3B;oBACH,CAAC,CAAC,IAAI;gBACR,KAAK,EACH,KAAK,IAAI,uBAAuB;oBAC9B,CAAC,CAAC;wBACE,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,OAAO,EAAE,KAAK,CAAC,EAAE;wBACjB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;4BACtC,EAAE,EAAE,MAAM,CAAC,EAAE;4BACb,IAAI,EAAE,MAAM,CAAC,IAAI;yBAClB,CAAC,CAAC;wBACH,uBAAuB;qBACxB;oBACH,CAAC,CAAC,IAAI;gBACV,0BAA0B,EAAE,0BAA0B;oBACpD,CAAC,CAAC;wBACE,IAAI,EAAE,0BAA0B,CAAC,IAAI;wBACrC,OAAO,EAAE,0BAA0B,CAAC,EAAE;qBACvC;oBACH,CAAC,CAAC,IAAI;aACT,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AArOD,4DAqOC"}
1
+ {"version":3,"file":"GraphqlProjectRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/GraphqlProjectRepository.ts"],"names":[],"mappings":";;;;;;AAA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,CAAC,IAAI;gBACR,gCAAgC,EAAE,gCAAgC;oBAChE,CAAC,CAAC;wBACE,IAAI,EAAE,gCAAgC,CAAC,IAAI;wBAC3C,OAAO,EAAE,gCAAgC,CAAC,EAAE;qBAC7C;oBACH,CAAC,CAAC,IAAI;gBACR,iCAAiC,EAAE,iCAAiC;oBAClE,CAAC,CAAC;wBACE,IAAI,EAAE,iCAAiC,CAAC,IAAI;wBAC5C,OAAO,EAAE,iCAAiC,CAAC,EAAE;qBAC9C;oBACH,CAAC,CAAC,IAAI;aACT,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AA9QD,4DA8QC"}
@@ -24,6 +24,12 @@ class LocalStorageRepository {
24
24
  this.mkdir = (dirPath) => {
25
25
  fs_1.default.mkdirSync(dirPath, { recursive: true });
26
26
  };
27
+ this.remove = (path) => {
28
+ fs_1.default.rmSync(path, {
29
+ force: true,
30
+ recursive: true,
31
+ });
32
+ };
27
33
  }
28
34
  }
29
35
  exports.LocalStorageRepository = LocalStorageRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalStorageRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/LocalStorageRepository.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AAEpB,MAAa,sBAAsB;IAAnC;QACE,UAAK,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACpB,YAAE,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC;QACF,SAAI,GAAG,CAAC,IAAY,EAAiB,EAAE;YACrC,OAAO,YAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC,CAAC;QACF,cAAS,GAAG,CAAC,OAAe,EAAY,EAAE;YACxC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC5B,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO,YAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QACF,UAAK,GAAG,CAAC,OAAe,EAAE,EAAE;YAC1B,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC;IACJ,CAAC;CAAA;AAlBD,wDAkBC"}
1
+ {"version":3,"file":"LocalStorageRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/LocalStorageRepository.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AAEpB,MAAa,sBAAsB;IAAnC;QACE,UAAK,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACpB,YAAE,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC;QACF,SAAI,GAAG,CAAC,IAAY,EAAiB,EAAE;YACrC,OAAO,YAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC,CAAC;QACF,cAAS,GAAG,CAAC,OAAe,EAAY,EAAE;YACxC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC5B,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO,YAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QACF,UAAK,GAAG,CAAC,OAAe,EAAE,EAAE;YAC1B,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC;QACF,WAAM,GAAG,CAAC,IAAY,EAAE,EAAE;YACxB,YAAE,CAAC,MAAM,CAAC,IAAI,EAAE;gBACd,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CAAA;AAxBD,wDAwBC"}
@@ -10,12 +10,24 @@ class SystemDateRepository {
10
10
  return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;
11
11
  };
12
12
  this.formatDateTimeWithDayOfWeek = (date) => {
13
+ const dateWithDayOfWeek = this.formatDateWithDayOfWeek(date);
14
+ const hours = String(date.getHours()).padStart(2, '0');
15
+ const minutes = String(date.getMinutes()).padStart(2, '0');
16
+ return `${dateWithDayOfWeek} ${hours}:${minutes}`;
17
+ };
18
+ this.formatDateWithDayOfWeek = (date) => {
13
19
  const dayOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getDay()];
14
20
  const month = String(date.getMonth() + 1).padStart(2, '0');
15
21
  const day = String(date.getDate()).padStart(2, '0');
16
- const hours = String(date.getHours()).padStart(2, '0');
17
- const minutes = String(date.getMinutes()).padStart(2, '0');
18
- return `${date.getFullYear()}/${month}/${day} (${dayOfWeek}) ${hours}:${minutes}`;
22
+ return `${date.getFullYear()}/${month}/${day} (${dayOfWeek})`;
23
+ };
24
+ this.formatStartEnd = (start, end) => {
25
+ const endDate = start.getFullYear() === end.getFullYear() &&
26
+ start.getMonth() === end.getMonth() &&
27
+ start.getDate() === end.getDate()
28
+ ? `${String(end.getHours()).padStart(2, '0')}:${String(end.getMinutes()).padStart(2, '0')}`
29
+ : this.formatDateTimeWithDayOfWeek(end);
30
+ return `${this.formatDateTimeWithDayOfWeek(start)} - ${endDate}`;
19
31
  };
20
32
  }
21
33
  }