github-issue-tower-defence-management 1.26.0 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js +17 -2
- package/bin/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +17 -2
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js +2 -1
- package/bin/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.test.ts +96 -1
- package/src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts +6 -0
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.test.ts +217 -0
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +6 -0
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.test.ts +80 -10
- package/src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts +2 -1
- package/types/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.27.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.27.0...v1.27.1) (2026-03-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **core:** pass bot credentials from config to BaseGitHubRepository ([73253ba](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/73253ba086a8491d70a88bda157d573072d49d1d))
|
|
7
|
+
|
|
8
|
+
# [1.27.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.26.0...v1.27.0) (2026-02-28)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **core:** add parent issue link to auto-created child issue description ([f5a26e2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/f5a26e2fb9239aa1f4f54c189de8e03f4f17f6fa))
|
|
14
|
+
|
|
1
15
|
# [1.26.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.25.0...v1.26.0) (2026-02-26)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -55,8 +55,8 @@ class GetStoryObjectMapUseCaseHandler {
|
|
|
55
55
|
});
|
|
56
56
|
const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
|
|
57
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, {
|
|
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 && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); 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 && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectUrl || _report(_exceptionable, {
|
|
60
60
|
path: _path + ".projectUrl",
|
|
61
61
|
expected: "string",
|
|
62
62
|
value: input.projectUrl
|
|
@@ -96,6 +96,18 @@ class GetStoryObjectMapUseCaseHandler {
|
|
|
96
96
|
path: _path + ".token",
|
|
97
97
|
expected: "string",
|
|
98
98
|
value: input.token
|
|
99
|
+
}), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
|
|
100
|
+
path: _path + ".name",
|
|
101
|
+
expected: "(string | undefined)",
|
|
102
|
+
value: input.name
|
|
103
|
+
}), undefined === input.password || "string" === typeof input.password || _report(_exceptionable, {
|
|
104
|
+
path: _path + ".password",
|
|
105
|
+
expected: "(string | undefined)",
|
|
106
|
+
value: input.password
|
|
107
|
+
}), undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey || _report(_exceptionable, {
|
|
108
|
+
path: _path + ".authenticatorKey",
|
|
109
|
+
expected: "(string | undefined)",
|
|
110
|
+
value: input.authenticatorKey
|
|
99
111
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
100
112
|
if (false === __is(input)) {
|
|
101
113
|
errors = [];
|
|
@@ -132,6 +144,9 @@ class GetStoryObjectMapUseCaseHandler {
|
|
|
132
144
|
localStorageRepository,
|
|
133
145
|
`${cachePath}/github.com.cookies.json`,
|
|
134
146
|
input.credentials.bot.github.token,
|
|
147
|
+
input.credentials.bot.github.name,
|
|
148
|
+
input.credentials.bot.github.password,
|
|
149
|
+
input.credentials.bot.github.authenticatorKey,
|
|
135
150
|
];
|
|
136
151
|
const projectRepository = {
|
|
137
152
|
...new GraphqlProjectRepository_1.GraphqlProjectRepository(...githubRepositoryParams),
|
|
@@ -1 +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,EAChB,iBAA0B,EAMzB,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;
|
|
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,EAChB,iBAA0B,EAMzB,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,CAA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C,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,MAAM,YAAY,GAChB,iBAAiB,KAAK,SAAS;gBAC7B,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE;gBACzD,CAAC,CAAC,KAAK,CAAC;YAEZ,OAAO,MAAM,wBAAwB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC,CAAC;IACJ,CAAC;CAAA;AA9FD,0EA8FC"}
|
|
@@ -70,8 +70,8 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
70
70
|
});
|
|
71
71
|
const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
|
|
72
72
|
const input = yaml_1.default.parse(configFileContent);
|
|
73
|
-
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 && (null === input.defaultStatus || "string" === typeof input.defaultStatus) && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && ("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)) && "string" === typeof input.spreadsheetUrl; 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; return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
|
|
74
|
-
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 && (null === input.defaultStatus || "string" === typeof input.defaultStatus) && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && ("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)) && "string" === typeof input.spreadsheetUrl; 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; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectName || _report(_exceptionable, {
|
|
73
|
+
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 && (null === input.defaultStatus || "string" === typeof input.defaultStatus) && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && ("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)) && "string" === typeof input.spreadsheetUrl; 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 && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
|
|
74
|
+
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 && (null === input.defaultStatus || "string" === typeof input.defaultStatus) && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && ("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)) && "string" === typeof input.spreadsheetUrl; 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 && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectName || _report(_exceptionable, {
|
|
75
75
|
path: _path + ".projectName",
|
|
76
76
|
expected: "string",
|
|
77
77
|
value: input.projectName
|
|
@@ -207,6 +207,18 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
207
207
|
path: _path + ".token",
|
|
208
208
|
expected: "string",
|
|
209
209
|
value: input.token
|
|
210
|
+
}), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
|
|
211
|
+
path: _path + ".name",
|
|
212
|
+
expected: "(string | undefined)",
|
|
213
|
+
value: input.name
|
|
214
|
+
}), undefined === input.password || "string" === typeof input.password || _report(_exceptionable, {
|
|
215
|
+
path: _path + ".password",
|
|
216
|
+
expected: "(string | undefined)",
|
|
217
|
+
value: input.password
|
|
218
|
+
}), undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey || _report(_exceptionable, {
|
|
219
|
+
path: _path + ".authenticatorKey",
|
|
220
|
+
expected: "(string | undefined)",
|
|
221
|
+
value: input.authenticatorKey
|
|
210
222
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
211
223
|
if (false === __is(input)) {
|
|
212
224
|
errors = [];
|
|
@@ -248,6 +260,9 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
248
260
|
localStorageRepository,
|
|
249
261
|
`${cachePath}/github.com.cookies.json`,
|
|
250
262
|
input.credentials.bot.github.token,
|
|
263
|
+
input.credentials.bot.github.name,
|
|
264
|
+
input.credentials.bot.github.password,
|
|
265
|
+
input.credentials.bot.github.authenticatorKey,
|
|
251
266
|
];
|
|
252
267
|
const projectRepository = {
|
|
253
268
|
...new GraphqlProjectRepository_1.GraphqlProjectRepository(...githubRepositoryParams),
|
|
@@ -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,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,sGAAmG;AACnG,gGAA6F;AAC7F,kGAA+F;AAC/F,gIAA6H;AAC7H,oGAAiG;AACjG,wGAAqG;AAIrG,0FAAuF;AACvF,wGAAqG;AACrG,wGAAqG;AACrG,kDAA0C;AAC1C,kIAA+H;AAC/H,8GAA2G;AAC3G,0GAAuG;AACvG,wGAAqG;AACrG,0FAAuF;AACvF,0HAAuH;AACvH,8GAA2G;AAE3G,MAAa,kCAAkC;IAA/C;QACE,WAAM,GAAG,KAAK,EACZ,cAAsB,EACtB,OAAgB,EAMR,EAAE;YACV,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;
|
|
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,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,sGAAmG;AACnG,gGAA6F;AAC7F,kGAA+F;AAC/F,gIAA6H;AAC7H,oGAAiG;AACjG,wGAAqG;AAIrG,0FAAuF;AACvF,wGAAqG;AACrG,wGAAqG;AACrG,kDAA0C;AAC1C,kIAA+H;AAC/H,8GAA2G;AAC3G,0GAAuG;AACvG,wGAAqG;AACrG,0FAAuF;AACvF,0HAAuH;AACvH,8GAA2G;AAE3G,MAAa,kCAAkC;IAA/C;QACE,WAAM,GAAG,KAAK,EACZ,cAAs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@ class ConvertCheckboxToIssueInStoryIssueUseCase {
|
|
|
29
29
|
let newBody = storyIssue.body;
|
|
30
30
|
for (const checkboxText of checkboxTextsNotCreatedIssue) {
|
|
31
31
|
const issueTitle = checkboxText.replace('STORYNAME', `${storyOption.name} #${storyIssue.number}`);
|
|
32
|
-
const
|
|
32
|
+
const newIssueBody = `- Parent issue: ${storyIssue.url}`;
|
|
33
|
+
const newIssueNumber = await this.issueRepository.createNewIssue(storyIssue.org, storyIssue.repo, issueTitle, newIssueBody, [], []);
|
|
33
34
|
const newIssueUrl = `https://github.com/${storyIssue.org}/${storyIssue.repo}/issues/${newIssueNumber}`;
|
|
34
35
|
newBody = newBody.replace(`- [ ] ${checkboxText}`, `- [ ] ${newIssueUrl}`);
|
|
35
36
|
await this.issueRepository.updateIssue({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":";;;AAKA,MAAa,yCAAyC;IACpD,YACW,eAGR;QAHQ,oBAAe,GAAf,eAAe,CAGvB;QAGH,QAAG,GAAG,KAAK,EAAE,KAOZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;gBAC9B,OAAO;YACT,CAAC;YAED,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;gBAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC7C,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CACzC,CAAC;gBACF,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBAC/D,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;oBAC9C,SAAS;gBACX,CAAC;qBAAM,IAAI,CAAC,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;oBACvC,MAAM,IAAI,KAAK,CAAC,0BAA0B,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;gBAChE,CAAC;qBAAM,IACL,UAAU,CAAC,QAAQ;oBACnB,UAAU,CAAC,MAAM,KAAK,KAAK,CAAC,cAAc,EAC1C,CAAC;oBACD,SAAS;gBACX,CAAC;qBAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC/C,SAAS;gBACX,CAAC;gBACD,MAAM,4BAA4B,GAChC,IAAI,CAAC,gCAAgC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACzD,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC;gBAC9B,KAAK,MAAM,YAAY,IAAI,4BAA4B,EAAE,CAAC;oBACxD,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CACrC,WAAW,EACX,GAAG,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM,EAAE,CAC5C,CAAC;oBACF,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAC9D,UAAU,CAAC,GAAG,EACd,UAAU,CAAC,IAAI,EACf,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":";;;AAKA,MAAa,yCAAyC;IACpD,YACW,eAGR;QAHQ,oBAAe,GAAf,eAAe,CAGvB;QAGH,QAAG,GAAG,KAAK,EAAE,KAOZ,EAAiB,EAAE;YAClB,MAAM,KAAK,GAA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;YAC1D,IAAI,CAAC,KAAK;gBAAE,OAAO,EAAE,CAAC;YACtB,MAAM,UAAU,GAAa,EAAE,CAAC;YAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,CAAC;YACD,OAAO,UAAU,CAAC,MAAM,CACtB,CAAC,QAAQ,EAAE,EAAE,CACX,QAAQ,KAAK,EAAE;gBACf,CAAC,QAAQ,CAAC,KAAK,CAAC,yCAAyC,CAAC;gBAC1D,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC5B,CAAC;QACJ,CAAC,CAAC;IArFC,CAAC;CAsFL;AA5FD,8FA4FC"}
|
package/package.json
CHANGED
|
@@ -27,6 +27,23 @@ jest.mock('../../../domain/usecases/GetStoryObjectMapUseCase', () => ({
|
|
|
27
27
|
}));
|
|
28
28
|
|
|
29
29
|
import { GetStoryObjectMapUseCaseHandler } from './GetStoryObjectMapUseCaseHandler';
|
|
30
|
+
import { GraphqlProjectRepository } from '../../repositories/GraphqlProjectRepository';
|
|
31
|
+
import { CheerioProjectRepository } from '../../repositories/CheerioProjectRepository';
|
|
32
|
+
import { ApiV3IssueRepository } from '../../repositories/issue/ApiV3IssueRepository';
|
|
33
|
+
import { RestIssueRepository } from '../../repositories/issue/RestIssueRepository';
|
|
34
|
+
import { GraphqlProjectItemRepository } from '../../repositories/issue/GraphqlProjectItemRepository';
|
|
35
|
+
import { ApiV3CheerioRestIssueRepository } from '../../repositories/issue/ApiV3CheerioRestIssueRepository';
|
|
36
|
+
|
|
37
|
+
const MockedGraphqlProjectRepository = jest.mocked(GraphqlProjectRepository);
|
|
38
|
+
const MockedCheerioProjectRepository = jest.mocked(CheerioProjectRepository);
|
|
39
|
+
const MockedApiV3IssueRepository = jest.mocked(ApiV3IssueRepository);
|
|
40
|
+
const MockedRestIssueRepository = jest.mocked(RestIssueRepository);
|
|
41
|
+
const MockedGraphqlProjectItemRepository = jest.mocked(
|
|
42
|
+
GraphqlProjectItemRepository,
|
|
43
|
+
);
|
|
44
|
+
const MockedApiV3CheerioRestIssueRepository = jest.mocked(
|
|
45
|
+
ApiV3CheerioRestIssueRepository,
|
|
46
|
+
);
|
|
30
47
|
|
|
31
48
|
const validConfig = {
|
|
32
49
|
projectUrl: 'https://github.com/orgs/test/projects/1',
|
|
@@ -43,7 +60,7 @@ const validConfig = {
|
|
|
43
60
|
|
|
44
61
|
describe('GetStoryObjectMapUseCaseHandler', () => {
|
|
45
62
|
beforeEach(() => {
|
|
46
|
-
|
|
63
|
+
jest.clearAllMocks();
|
|
47
64
|
jest.mocked(fs.readFileSync).mockReturnValue(YAML.stringify(validConfig));
|
|
48
65
|
});
|
|
49
66
|
|
|
@@ -79,4 +96,82 @@ describe('GetStoryObjectMapUseCaseHandler', () => {
|
|
|
79
96
|
}),
|
|
80
97
|
);
|
|
81
98
|
});
|
|
99
|
+
|
|
100
|
+
it('should pass bot credentials to repository constructors when provided', async () => {
|
|
101
|
+
const configWithCredentials = {
|
|
102
|
+
...validConfig,
|
|
103
|
+
credentials: {
|
|
104
|
+
bot: {
|
|
105
|
+
github: {
|
|
106
|
+
token: 'test-token',
|
|
107
|
+
name: 'bot-user',
|
|
108
|
+
password: 'bot-pass',
|
|
109
|
+
authenticatorKey: 'bot-auth-key',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
jest
|
|
115
|
+
.mocked(fs.readFileSync)
|
|
116
|
+
.mockReturnValue(YAML.stringify(configWithCredentials));
|
|
117
|
+
|
|
118
|
+
const handler = new GetStoryObjectMapUseCaseHandler();
|
|
119
|
+
await handler.handle('config.yml', false);
|
|
120
|
+
|
|
121
|
+
const expectedCookiePath = `./tmp/cache/${validConfig.projectName}/github.com.cookies.json`;
|
|
122
|
+
|
|
123
|
+
for (const MockedClass of [
|
|
124
|
+
MockedGraphqlProjectRepository,
|
|
125
|
+
MockedCheerioProjectRepository,
|
|
126
|
+
MockedApiV3IssueRepository,
|
|
127
|
+
MockedRestIssueRepository,
|
|
128
|
+
MockedGraphqlProjectItemRepository,
|
|
129
|
+
]) {
|
|
130
|
+
expect(MockedClass).toHaveBeenCalledWith(
|
|
131
|
+
expect.anything(),
|
|
132
|
+
expectedCookiePath,
|
|
133
|
+
'test-token',
|
|
134
|
+
'bot-user',
|
|
135
|
+
'bot-pass',
|
|
136
|
+
'bot-auth-key',
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
expect(MockedApiV3CheerioRestIssueRepository).toHaveBeenCalledWith(
|
|
141
|
+
expect.anything(),
|
|
142
|
+
expect.anything(),
|
|
143
|
+
expect.anything(),
|
|
144
|
+
expect.anything(),
|
|
145
|
+
expect.anything(),
|
|
146
|
+
expectedCookiePath,
|
|
147
|
+
'test-token',
|
|
148
|
+
'bot-user',
|
|
149
|
+
'bot-pass',
|
|
150
|
+
'bot-auth-key',
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('should pass undefined credentials when not provided in config', async () => {
|
|
155
|
+
const handler = new GetStoryObjectMapUseCaseHandler();
|
|
156
|
+
await handler.handle('config.yml', false);
|
|
157
|
+
|
|
158
|
+
const expectedCookiePath = `./tmp/cache/${validConfig.projectName}/github.com.cookies.json`;
|
|
159
|
+
|
|
160
|
+
for (const MockedClass of [
|
|
161
|
+
MockedGraphqlProjectRepository,
|
|
162
|
+
MockedCheerioProjectRepository,
|
|
163
|
+
MockedApiV3IssueRepository,
|
|
164
|
+
MockedRestIssueRepository,
|
|
165
|
+
MockedGraphqlProjectItemRepository,
|
|
166
|
+
]) {
|
|
167
|
+
expect(MockedClass).toHaveBeenCalledWith(
|
|
168
|
+
expect.anything(),
|
|
169
|
+
expectedCookiePath,
|
|
170
|
+
'test-token',
|
|
171
|
+
undefined,
|
|
172
|
+
undefined,
|
|
173
|
+
undefined,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
82
177
|
});
|
|
@@ -50,6 +50,9 @@ export class GetStoryObjectMapUseCaseHandler {
|
|
|
50
50
|
bot: {
|
|
51
51
|
github: {
|
|
52
52
|
token: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
password?: string;
|
|
55
|
+
authenticatorKey?: string;
|
|
53
56
|
};
|
|
54
57
|
};
|
|
55
58
|
};
|
|
@@ -72,6 +75,9 @@ export class GetStoryObjectMapUseCaseHandler {
|
|
|
72
75
|
localStorageRepository,
|
|
73
76
|
`${cachePath}/github.com.cookies.json`,
|
|
74
77
|
input.credentials.bot.github.token,
|
|
78
|
+
input.credentials.bot.github.name,
|
|
79
|
+
input.credentials.bot.github.password,
|
|
80
|
+
input.credentials.bot.github.authenticatorKey,
|
|
75
81
|
];
|
|
76
82
|
const projectRepository = {
|
|
77
83
|
...new GraphqlProjectRepository(...githubRepositoryParams),
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import YAML from 'yaml';
|
|
3
|
+
|
|
4
|
+
jest.mock('fs');
|
|
5
|
+
jest.mock('gh-cookie', () => ({ getCookieContent: jest.fn() }));
|
|
6
|
+
jest.mock('../../repositories/SystemDateRepository');
|
|
7
|
+
jest.mock('../../repositories/LocalStorageRepository');
|
|
8
|
+
jest.mock('../../repositories/GoogleSpreadsheetRepository');
|
|
9
|
+
jest.mock('../../repositories/GraphqlProjectRepository');
|
|
10
|
+
jest.mock('../../repositories/CheerioProjectRepository');
|
|
11
|
+
jest.mock('../../repositories/issue/ApiV3IssueRepository');
|
|
12
|
+
jest.mock('../../repositories/issue/RestIssueRepository');
|
|
13
|
+
jest.mock('../../repositories/issue/GraphqlProjectItemRepository');
|
|
14
|
+
jest.mock('../../repositories/issue/ApiV3CheerioRestIssueRepository');
|
|
15
|
+
jest.mock('../../repositories/LocalStorageCacheRepository');
|
|
16
|
+
jest.mock('../../repositories/BaseGitHubRepository');
|
|
17
|
+
|
|
18
|
+
const mockRun = jest.fn().mockResolvedValue({
|
|
19
|
+
project: {},
|
|
20
|
+
issues: [],
|
|
21
|
+
cacheUsed: false,
|
|
22
|
+
targetDateTimes: [],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
jest.mock('../../../domain/usecases/HandleScheduledEventUseCase', () => ({
|
|
26
|
+
HandleScheduledEventUseCase: jest.fn().mockImplementation(() => ({
|
|
27
|
+
run: mockRun,
|
|
28
|
+
})),
|
|
29
|
+
}));
|
|
30
|
+
jest.mock('../../../domain/usecases/ActionAnnouncementUseCase', () => ({
|
|
31
|
+
ActionAnnouncementUseCase: jest.fn().mockImplementation(() => ({})),
|
|
32
|
+
}));
|
|
33
|
+
jest.mock(
|
|
34
|
+
'../../../domain/usecases/SetWorkflowManagementIssueToStoryUseCase',
|
|
35
|
+
() => ({
|
|
36
|
+
SetWorkflowManagementIssueToStoryUseCase: jest
|
|
37
|
+
.fn()
|
|
38
|
+
.mockImplementation(() => ({})),
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
jest.mock('../../../domain/usecases/ClearNextActionHourUseCase', () => ({
|
|
42
|
+
ClearNextActionHourUseCase: jest.fn().mockImplementation(() => ({})),
|
|
43
|
+
}));
|
|
44
|
+
jest.mock('../../../domain/usecases/AnalyzeProblemByIssueUseCase', () => ({
|
|
45
|
+
AnalyzeProblemByIssueUseCase: jest.fn().mockImplementation(() => ({})),
|
|
46
|
+
}));
|
|
47
|
+
jest.mock('../../../domain/usecases/AnalyzeStoriesUseCase', () => ({
|
|
48
|
+
AnalyzeStoriesUseCase: jest.fn().mockImplementation(() => ({})),
|
|
49
|
+
}));
|
|
50
|
+
jest.mock('../../../domain/usecases/ClearDependedIssueURLUseCase', () => ({
|
|
51
|
+
ClearDependedIssueURLUseCase: jest.fn().mockImplementation(() => ({})),
|
|
52
|
+
}));
|
|
53
|
+
jest.mock('../../../domain/usecases/CreateEstimationIssueUseCase', () => ({
|
|
54
|
+
CreateEstimationIssueUseCase: jest.fn().mockImplementation(() => ({})),
|
|
55
|
+
}));
|
|
56
|
+
jest.mock(
|
|
57
|
+
'../../../domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase',
|
|
58
|
+
() => ({
|
|
59
|
+
ConvertCheckboxToIssueInStoryIssueUseCase: jest
|
|
60
|
+
.fn()
|
|
61
|
+
.mockImplementation(() => ({})),
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
64
|
+
jest.mock('../../../domain/usecases/ChangeStatusByStoryColorUseCase', () => ({
|
|
65
|
+
ChangeStatusByStoryColorUseCase: jest.fn().mockImplementation(() => ({})),
|
|
66
|
+
}));
|
|
67
|
+
jest.mock('../../../domain/usecases/SetNoStoryIssueToStoryUseCase', () => ({
|
|
68
|
+
SetNoStoryIssueToStoryUseCase: jest.fn().mockImplementation(() => ({})),
|
|
69
|
+
}));
|
|
70
|
+
jest.mock('../../../domain/usecases/CreateNewStoryByLabelUseCase', () => ({
|
|
71
|
+
CreateNewStoryByLabelUseCase: jest.fn().mockImplementation(() => ({})),
|
|
72
|
+
}));
|
|
73
|
+
jest.mock(
|
|
74
|
+
'../../../domain/usecases/AssignNoAssigneeIssueToManagerUseCase',
|
|
75
|
+
() => ({
|
|
76
|
+
AssignNoAssigneeIssueToManagerUseCase: jest
|
|
77
|
+
.fn()
|
|
78
|
+
.mockImplementation(() => ({})),
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
jest.mock('../../../domain/usecases/UpdateIssueStatusByLabelUseCase', () => ({
|
|
82
|
+
UpdateIssueStatusByLabelUseCase: jest.fn().mockImplementation(() => ({})),
|
|
83
|
+
}));
|
|
84
|
+
|
|
85
|
+
import { HandleScheduledEventUseCaseHandler } from './HandleScheduledEventUseCaseHandler';
|
|
86
|
+
import { GraphqlProjectRepository } from '../../repositories/GraphqlProjectRepository';
|
|
87
|
+
import { CheerioProjectRepository } from '../../repositories/CheerioProjectRepository';
|
|
88
|
+
import { ApiV3IssueRepository } from '../../repositories/issue/ApiV3IssueRepository';
|
|
89
|
+
import { RestIssueRepository } from '../../repositories/issue/RestIssueRepository';
|
|
90
|
+
import { GraphqlProjectItemRepository } from '../../repositories/issue/GraphqlProjectItemRepository';
|
|
91
|
+
import { ApiV3CheerioRestIssueRepository } from '../../repositories/issue/ApiV3CheerioRestIssueRepository';
|
|
92
|
+
|
|
93
|
+
const MockedGraphqlProjectRepository = jest.mocked(GraphqlProjectRepository);
|
|
94
|
+
const MockedCheerioProjectRepository = jest.mocked(CheerioProjectRepository);
|
|
95
|
+
const MockedApiV3IssueRepository = jest.mocked(ApiV3IssueRepository);
|
|
96
|
+
const MockedRestIssueRepository = jest.mocked(RestIssueRepository);
|
|
97
|
+
const MockedGraphqlProjectItemRepository = jest.mocked(
|
|
98
|
+
GraphqlProjectItemRepository,
|
|
99
|
+
);
|
|
100
|
+
const MockedApiV3CheerioRestIssueRepository = jest.mocked(
|
|
101
|
+
ApiV3CheerioRestIssueRepository,
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const validConfig = {
|
|
105
|
+
projectName: 'test-project',
|
|
106
|
+
org: 'TestOrg',
|
|
107
|
+
projectUrl: 'https://github.com/users/TestOrg/projects/1',
|
|
108
|
+
manager: 'TestManager',
|
|
109
|
+
urlOfStoryView: 'https://github.com/users/TestOrg/projects/1/views/1',
|
|
110
|
+
disabledStatus: 'Icebox',
|
|
111
|
+
defaultStatus: 'Unread',
|
|
112
|
+
disabled: false,
|
|
113
|
+
allowIssueCacheMinutes: 1,
|
|
114
|
+
workingReport: {
|
|
115
|
+
repo: 'test-repo',
|
|
116
|
+
members: ['TestManager'],
|
|
117
|
+
spreadsheetUrl: 'https://docs.google.com/spreadsheets/d/test/edit',
|
|
118
|
+
},
|
|
119
|
+
credentials: {
|
|
120
|
+
manager: {
|
|
121
|
+
github: { token: 'ghp_manager_token' },
|
|
122
|
+
slack: { userToken: 'xoxp-slack-token' },
|
|
123
|
+
googleServiceAccount: { serviceAccountKey: '{}' },
|
|
124
|
+
},
|
|
125
|
+
bot: {
|
|
126
|
+
github: {
|
|
127
|
+
token: 'test-token',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
describe('HandleScheduledEventUseCaseHandler', () => {
|
|
134
|
+
beforeEach(() => {
|
|
135
|
+
jest.clearAllMocks();
|
|
136
|
+
jest.mocked(fs.readFileSync).mockReturnValue(YAML.stringify(validConfig));
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('should pass bot credentials to repository constructors when provided', async () => {
|
|
140
|
+
const configWithCredentials = {
|
|
141
|
+
...validConfig,
|
|
142
|
+
credentials: {
|
|
143
|
+
...validConfig.credentials,
|
|
144
|
+
bot: {
|
|
145
|
+
github: {
|
|
146
|
+
token: 'test-token',
|
|
147
|
+
name: 'bot-user',
|
|
148
|
+
password: 'bot-pass',
|
|
149
|
+
authenticatorKey: 'bot-auth-key',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
jest
|
|
155
|
+
.mocked(fs.readFileSync)
|
|
156
|
+
.mockReturnValue(YAML.stringify(configWithCredentials));
|
|
157
|
+
|
|
158
|
+
const handler = new HandleScheduledEventUseCaseHandler();
|
|
159
|
+
await handler.handle('config.yml', false);
|
|
160
|
+
|
|
161
|
+
const expectedCookiePath = `./tmp/cache/${validConfig.projectName}/github.com.cookies.json`;
|
|
162
|
+
|
|
163
|
+
for (const MockedClass of [
|
|
164
|
+
MockedGraphqlProjectRepository,
|
|
165
|
+
MockedCheerioProjectRepository,
|
|
166
|
+
MockedApiV3IssueRepository,
|
|
167
|
+
MockedRestIssueRepository,
|
|
168
|
+
MockedGraphqlProjectItemRepository,
|
|
169
|
+
]) {
|
|
170
|
+
expect(MockedClass).toHaveBeenCalledWith(
|
|
171
|
+
expect.anything(),
|
|
172
|
+
expectedCookiePath,
|
|
173
|
+
'test-token',
|
|
174
|
+
'bot-user',
|
|
175
|
+
'bot-pass',
|
|
176
|
+
'bot-auth-key',
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
expect(MockedApiV3CheerioRestIssueRepository).toHaveBeenCalledWith(
|
|
181
|
+
expect.anything(),
|
|
182
|
+
expect.anything(),
|
|
183
|
+
expect.anything(),
|
|
184
|
+
expect.anything(),
|
|
185
|
+
expect.anything(),
|
|
186
|
+
expectedCookiePath,
|
|
187
|
+
'test-token',
|
|
188
|
+
'bot-user',
|
|
189
|
+
'bot-pass',
|
|
190
|
+
'bot-auth-key',
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it('should pass undefined credentials when not provided in config', async () => {
|
|
195
|
+
const handler = new HandleScheduledEventUseCaseHandler();
|
|
196
|
+
await handler.handle('config.yml', false);
|
|
197
|
+
|
|
198
|
+
const expectedCookiePath = `./tmp/cache/${validConfig.projectName}/github.com.cookies.json`;
|
|
199
|
+
|
|
200
|
+
for (const MockedClass of [
|
|
201
|
+
MockedGraphqlProjectRepository,
|
|
202
|
+
MockedCheerioProjectRepository,
|
|
203
|
+
MockedApiV3IssueRepository,
|
|
204
|
+
MockedRestIssueRepository,
|
|
205
|
+
MockedGraphqlProjectItemRepository,
|
|
206
|
+
]) {
|
|
207
|
+
expect(MockedClass).toHaveBeenCalledWith(
|
|
208
|
+
expect.anything(),
|
|
209
|
+
expectedCookiePath,
|
|
210
|
+
'test-token',
|
|
211
|
+
undefined,
|
|
212
|
+
undefined,
|
|
213
|
+
undefined,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
});
|
|
@@ -71,6 +71,9 @@ export class HandleScheduledEventUseCaseHandler {
|
|
|
71
71
|
bot: {
|
|
72
72
|
github: {
|
|
73
73
|
token: string;
|
|
74
|
+
name?: string;
|
|
75
|
+
password?: string;
|
|
76
|
+
authenticatorKey?: string;
|
|
74
77
|
};
|
|
75
78
|
};
|
|
76
79
|
};
|
|
@@ -101,6 +104,9 @@ export class HandleScheduledEventUseCaseHandler {
|
|
|
101
104
|
localStorageRepository,
|
|
102
105
|
`${cachePath}/github.com.cookies.json`,
|
|
103
106
|
input.credentials.bot.github.token,
|
|
107
|
+
input.credentials.bot.github.name,
|
|
108
|
+
input.credentials.bot.github.password,
|
|
109
|
+
input.credentials.bot.github.authenticatorKey,
|
|
104
110
|
];
|
|
105
111
|
const projectRepository = {
|
|
106
112
|
...new GraphqlProjectRepository(...githubRepositoryParams),
|
|
@@ -212,10 +212,38 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
|
|
|
212
212
|
storyObjectMap: basicStoryObjectMap,
|
|
213
213
|
},
|
|
214
214
|
expectedCreateNewIssueCalls: [
|
|
215
|
-
[
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
[
|
|
216
|
+
'org',
|
|
217
|
+
'repo',
|
|
218
|
+
'Task 1',
|
|
219
|
+
'- Parent issue: https://github.com/org/repo/issues/123',
|
|
220
|
+
[],
|
|
221
|
+
[],
|
|
222
|
+
],
|
|
223
|
+
[
|
|
224
|
+
'org',
|
|
225
|
+
'repo',
|
|
226
|
+
'Task 2',
|
|
227
|
+
'- Parent issue: https://github.com/org/repo/issues/123',
|
|
228
|
+
[],
|
|
229
|
+
[],
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
'org',
|
|
233
|
+
'repo',
|
|
234
|
+
'Task 3',
|
|
235
|
+
'- Parent issue: https://github.com/org/repo/issues/456',
|
|
236
|
+
[],
|
|
237
|
+
[],
|
|
238
|
+
],
|
|
239
|
+
[
|
|
240
|
+
'org',
|
|
241
|
+
'repo',
|
|
242
|
+
'Task 4',
|
|
243
|
+
'- Parent issue: https://github.com/org/repo/issues/456',
|
|
244
|
+
[],
|
|
245
|
+
[],
|
|
246
|
+
],
|
|
219
247
|
],
|
|
220
248
|
expectedUpdateIssueCalls: [
|
|
221
249
|
[
|
|
@@ -306,10 +334,38 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
|
|
|
306
334
|
storyObjectMap: basicStoryObjectMap,
|
|
307
335
|
},
|
|
308
336
|
expectedCreateNewIssueCalls: [
|
|
309
|
-
[
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
337
|
+
[
|
|
338
|
+
'org',
|
|
339
|
+
'repo',
|
|
340
|
+
'Task 1',
|
|
341
|
+
'- Parent issue: https://github.com/org/repo/issues/123',
|
|
342
|
+
[],
|
|
343
|
+
[],
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
'org',
|
|
347
|
+
'repo',
|
|
348
|
+
'Task 2 for `Story 1 #123`',
|
|
349
|
+
'- Parent issue: https://github.com/org/repo/issues/123',
|
|
350
|
+
[],
|
|
351
|
+
[],
|
|
352
|
+
],
|
|
353
|
+
[
|
|
354
|
+
'org',
|
|
355
|
+
'repo',
|
|
356
|
+
'Task 3',
|
|
357
|
+
'- Parent issue: https://github.com/org/repo/issues/456',
|
|
358
|
+
[],
|
|
359
|
+
[],
|
|
360
|
+
],
|
|
361
|
+
[
|
|
362
|
+
'org',
|
|
363
|
+
'repo',
|
|
364
|
+
'Task 4',
|
|
365
|
+
'- Parent issue: https://github.com/org/repo/issues/456',
|
|
366
|
+
[],
|
|
367
|
+
[],
|
|
368
|
+
],
|
|
313
369
|
],
|
|
314
370
|
expectedUpdateIssueCalls: [
|
|
315
371
|
[
|
|
@@ -441,8 +497,22 @@ describe('ConvertCheckboxToIssueInStoryIssueUseCase', () => {
|
|
|
441
497
|
]),
|
|
442
498
|
},
|
|
443
499
|
expectedCreateNewIssueCalls: [
|
|
444
|
-
[
|
|
445
|
-
|
|
500
|
+
[
|
|
501
|
+
'orgA',
|
|
502
|
+
'repoA',
|
|
503
|
+
'Task 1',
|
|
504
|
+
'- Parent issue: https://github.com/org/repo/issues/123',
|
|
505
|
+
[],
|
|
506
|
+
[],
|
|
507
|
+
],
|
|
508
|
+
[
|
|
509
|
+
'orgB',
|
|
510
|
+
'repoB',
|
|
511
|
+
'Task 2',
|
|
512
|
+
'- Parent issue: https://github.com/org/repo/issues/456',
|
|
513
|
+
[],
|
|
514
|
+
[],
|
|
515
|
+
],
|
|
446
516
|
],
|
|
447
517
|
expectedUpdateIssueCalls: [
|
|
448
518
|
[
|
|
@@ -49,11 +49,12 @@ export class ConvertCheckboxToIssueInStoryIssueUseCase {
|
|
|
49
49
|
'STORYNAME',
|
|
50
50
|
`${storyOption.name} #${storyIssue.number}`,
|
|
51
51
|
);
|
|
52
|
+
const newIssueBody = `- Parent issue: ${storyIssue.url}`;
|
|
52
53
|
const newIssueNumber = await this.issueRepository.createNewIssue(
|
|
53
54
|
storyIssue.org,
|
|
54
55
|
storyIssue.repo,
|
|
55
56
|
issueTitle,
|
|
56
|
-
|
|
57
|
+
newIssueBody,
|
|
57
58
|
[],
|
|
58
59
|
[],
|
|
59
60
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetStoryObjectMapUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAI3D,OAAO,EAEL,cAAc,EACf,MAAM,mDAAmD,CAAC;AAE3D,qBAAa,+BAA+B;IAC1C,MAAM,mBACY,MAAM,WACb,OAAO,sBACI,MAAM,KACzB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,cAAc,CAAC;KAChC,CAAC,
|
|
1
|
+
{"version":3,"file":"GetStoryObjectMapUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/GetStoryObjectMapUseCaseHandler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAI3D,OAAO,EAEL,cAAc,EACf,MAAM,mDAAmD,CAAC;AAE3D,qBAAa,+BAA+B;IAC1C,MAAM,mBACY,MAAM,WACb,OAAO,sBACI,MAAM,KACzB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,cAAc,CAAC;KAChC,CAAC,CAmFA;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAc3D,qBAAa,kCAAkC;IAC7C,MAAM,mBACY,MAAM,WACb,OAAO,KACf,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAc3D,qBAAa,kCAAkC;IAC7C,MAAM,mBACY,MAAM,WACb,OAAO,KACf,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CAuJP;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,qBAAa,yCAAyC;IAElD,QAAQ,CAAC,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,gBAAgB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CACnE;gBAHQ,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,gBAAgB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CACnE;IAGH,GAAG,UAAiB;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,cAAc,CAAC;KAChC,KAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"ConvertCheckboxToIssueInStoryIssueUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/ConvertCheckboxToIssueInStoryIssueUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,qBAAa,yCAAyC;IAElD,QAAQ,CAAC,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,gBAAgB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CACnE;gBAHQ,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,gBAAgB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CACnE;IAGH,GAAG,UAAiB;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,cAAc,CAAC;KAChC,KAAG,OAAO,CAAC,IAAI,CAAC,CA6Df;IACF,gCAAgC,mBAAoB,MAAM,KAAG,MAAM,EAAE,CAcnE;CACH"}
|