npm-cli-gh-issue-preparator 1.3.0 → 1.5.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.
- package/.github/copilot-instructions.md +0 -0
- package/.github/instructions/code-review.instructions.md +43 -0
- package/.github/workflows/umino-project.yml +1 -1
- package/CHANGELOG.md +14 -0
- package/bin/adapter/entry-points/cli/index.js +15 -0
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/domain/usecases/StartPreparationUseCase.js +6 -3
- package/bin/domain/usecases/StartPreparationUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.test.ts +218 -1
- package/src/adapter/entry-points/cli/index.ts +25 -0
- package/src/domain/usecases/StartPreparationUseCase.test.ts +113 -0
- package/src/domain/usecases/StartPreparationUseCase.ts +8 -3
- package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts +2 -1
- package/types/domain/usecases/StartPreparationUseCase.d.ts.map +1 -1
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: '**'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Code Review Instructions
|
|
6
|
+
|
|
7
|
+
## Scope Integrity
|
|
8
|
+
|
|
9
|
+
Flag pull requests that contain changes unrelated to the stated PR title or description.
|
|
10
|
+
Each PR must address a single topic or feature.
|
|
11
|
+
If unrelated modifications are detected, request that they be split into separate issues first.
|
|
12
|
+
|
|
13
|
+
## Lint and Static Analysis Bypass Detection
|
|
14
|
+
|
|
15
|
+
Flag any code that disables, ignores, or bypasses linting rules.
|
|
16
|
+
Report usage of eslint-disable, @ts-ignore, @ts-expect-error, noqa, or similar suppression comments.
|
|
17
|
+
Flag modifications to linter configuration files that weaken existing rules.
|
|
18
|
+
|
|
19
|
+
## Error Handling Violations
|
|
20
|
+
|
|
21
|
+
Flag code that catches exceptions but does nothing with them (empty catch blocks).
|
|
22
|
+
Flag API endpoints that return HTTP 200 status codes when errors have occurred.
|
|
23
|
+
Flag code that converts errors into success responses or hides error states.
|
|
24
|
+
Flag use of console.log for error handling instead of proper error propagation.
|
|
25
|
+
Flag code that swallows errors by returning default values without logging or reporting.
|
|
26
|
+
|
|
27
|
+
## Test Coverage Requirements
|
|
28
|
+
|
|
29
|
+
Flag new features or bug fixes that lack corresponding unit tests.
|
|
30
|
+
Flag modifications to existing code where related tests have not been updated.
|
|
31
|
+
Flag deletion or disabling of existing tests without justification.
|
|
32
|
+
Flag test files that use skip, only, or other mechanisms to bypass test execution.
|
|
33
|
+
Flag mock implementations that always return success without testing failure scenarios.
|
|
34
|
+
Report when test coverage for modified files appears insufficient.
|
|
35
|
+
Report when test assertion for modified files appears insufficient.
|
|
36
|
+
|
|
37
|
+
## Code Quality Red Flags
|
|
38
|
+
|
|
39
|
+
Flag hardcoded credentials, API keys, or secrets.
|
|
40
|
+
Flag commented-out code blocks.
|
|
41
|
+
Flag TODO or FIXME comments without associated issue references.
|
|
42
|
+
Flag any use of type assertions (as any, as unknown) that bypass type safety.
|
|
43
|
+
Flag functions with excessive cyclomatic complexity.
|
|
@@ -41,7 +41,7 @@ env:
|
|
|
41
41
|
|
|
42
42
|
jobs:
|
|
43
43
|
umino-job:
|
|
44
|
-
if: github.event_name != 'issue_comment' || github.event.comment.user.login != 'umino-bot'
|
|
44
|
+
if: (github.event_name != 'issue_comment' || github.event.comment.user.login != 'umino-bot') && github.event.action != 'labeled'
|
|
45
45
|
runs-on: ubuntu-latest
|
|
46
46
|
steps:
|
|
47
47
|
- name: Move issue to ${{ env.unread }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.5.0](https://github.com/HiromiShikata/npm-cli-gh-issue-preparator/compare/v1.4.0...v1.5.0) (2026-01-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **cli:** add maximumPreparingIssuesCount as cli parameter for startDaemon ([a3f1e98](https://github.com/HiromiShikata/npm-cli-gh-issue-preparator/commit/a3f1e985c65cdda426538abd5d1552344f33da0e))
|
|
7
|
+
|
|
8
|
+
# [1.4.0](https://github.com/HiromiShikata/npm-cli-gh-issue-preparator/compare/v1.3.0...v1.4.0) (2026-01-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **cli:** add logFilePath to cli parameter ([8e7dba7](https://github.com/HiromiShikata/npm-cli-gh-issue-preparator/commit/8e7dba7608cac085883c7beaeca1cd5de490f46e))
|
|
14
|
+
|
|
1
15
|
# [1.3.0](https://github.com/HiromiShikata/npm-cli-gh-issue-preparator/compare/v1.2.0...v1.3.0) (2026-01-12)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -25,6 +25,8 @@ program
|
|
|
25
25
|
.requiredOption('--awaitingWorkspaceStatus <status>', 'Status for issues awaiting workspace')
|
|
26
26
|
.requiredOption('--preparationStatus <status>', 'Status for issues in preparation')
|
|
27
27
|
.requiredOption('--defaultAgentName <name>', 'Default agent name')
|
|
28
|
+
.option('--logFilePath <path>', 'Path to log file')
|
|
29
|
+
.option('--maximumPreparingIssuesCount <count>', 'Maximum number of issues in preparation status (default: 6)')
|
|
28
30
|
.action(async (options) => {
|
|
29
31
|
const token = process.env.GH_TOKEN;
|
|
30
32
|
if (!token) {
|
|
@@ -35,11 +37,24 @@ program
|
|
|
35
37
|
const issueRepository = new GitHubIssueRepository_1.GitHubIssueRepository(token);
|
|
36
38
|
const localCommandRunner = new NodeLocalCommandRunner_1.NodeLocalCommandRunner();
|
|
37
39
|
const useCase = new StartPreparationUseCase_1.StartPreparationUseCase(projectRepository, issueRepository, localCommandRunner);
|
|
40
|
+
let maximumPreparingIssuesCount = null;
|
|
41
|
+
if (options.maximumPreparingIssuesCount !== undefined) {
|
|
42
|
+
const parsedCount = Number(options.maximumPreparingIssuesCount);
|
|
43
|
+
if (!Number.isFinite(parsedCount) ||
|
|
44
|
+
!Number.isInteger(parsedCount) ||
|
|
45
|
+
parsedCount <= 0) {
|
|
46
|
+
console.error('Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.');
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
maximumPreparingIssuesCount = parsedCount;
|
|
50
|
+
}
|
|
38
51
|
await useCase.run({
|
|
39
52
|
projectUrl: options.projectUrl,
|
|
40
53
|
awaitingWorkspaceStatus: options.awaitingWorkspaceStatus,
|
|
41
54
|
preparationStatus: options.preparationStatus,
|
|
42
55
|
defaultAgentName: options.defaultAgentName,
|
|
56
|
+
logFilePath: options.logFilePath,
|
|
57
|
+
maximumPreparingIssuesCount,
|
|
43
58
|
});
|
|
44
59
|
});
|
|
45
60
|
program
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";;;;;;;AACA,oDAA4B;AAC5B,gBAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,yCAAoC;AACpC,8FAA2F;AAC3F,0HAAuH;AACvH,wFAAqF;AACrF,oFAAiF;AACjF,sFAAmF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,14 +6,14 @@ class StartPreparationUseCase {
|
|
|
6
6
|
this.projectRepository = projectRepository;
|
|
7
7
|
this.issueRepository = issueRepository;
|
|
8
8
|
this.localCommandRunner = localCommandRunner;
|
|
9
|
-
this.maximumPreparingIssuesCount = 6;
|
|
10
9
|
this.run = async (params) => {
|
|
10
|
+
const maximumPreparingIssuesCount = params.maximumPreparingIssuesCount ?? 6;
|
|
11
11
|
const project = await this.projectRepository.getByUrl(params.projectUrl);
|
|
12
12
|
const allIssues = await this.issueRepository.getAllOpened(project);
|
|
13
13
|
const awaitingWorkspaceIssues = allIssues.filter((issue) => issue.status === params.awaitingWorkspaceStatus);
|
|
14
14
|
const currentPreparationIssueCount = allIssues.filter((issue) => issue.status === params.preparationStatus).length;
|
|
15
15
|
for (let i = currentPreparationIssueCount; i <
|
|
16
|
-
Math.min(
|
|
16
|
+
Math.min(maximumPreparingIssuesCount, awaitingWorkspaceIssues.length + currentPreparationIssueCount); i++) {
|
|
17
17
|
const issue = awaitingWorkspaceIssues.pop();
|
|
18
18
|
if (!issue) {
|
|
19
19
|
break;
|
|
@@ -24,7 +24,10 @@ class StartPreparationUseCase {
|
|
|
24
24
|
.trim() || params.defaultAgentName;
|
|
25
25
|
issue.status = params.preparationStatus;
|
|
26
26
|
await this.issueRepository.update(issue, project);
|
|
27
|
-
|
|
27
|
+
const logFilePathArg = params.logFilePath
|
|
28
|
+
? `--logFilePath ${params.logFilePath}`
|
|
29
|
+
: '';
|
|
30
|
+
await this.localCommandRunner.runCommand(`aw ${issue.url} ${agent} ${project.url}${logFilePathArg ? ` ${logFilePathArg}` : ''}`);
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartPreparationUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"StartPreparationUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,uBAAuB;IAClC,YACmB,iBAAoC,EACpC,eAAgC,EAChC,kBAAsC;QAFtC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,oBAAe,GAAf,eAAe,CAAiB;QAChC,uBAAkB,GAAlB,kBAAkB,CAAoB;QAGzD,QAAG,GAAG,KAAK,EAAE,MAOZ,EAAiB,EAAE;YAClB,MAAM,2BAA2B,GAAG,MAAM,CAAC,2BAA2B,IAAI,CAAC,CAAC;YAC5E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEzE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAEnE,MAAM,uBAAuB,GAAG,SAAS,CAAC,MAAM,CAC9C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,uBAAuB,CAC3D,CAAC;YACF,MAAM,4BAA4B,GAAG,SAAS,CAAC,MAAM,CACnD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,iBAAiB,CACrD,CAAC,MAAM,CAAC;YAET,KACE,IAAI,CAAC,GAAG,4BAA4B,EACpC,CAAC;gBACD,IAAI,CAAC,GAAG,CACN,2BAA2B,EAC3B,uBAAuB,CAAC,MAAM,GAAG,4BAA4B,CAC9D,EACD,CAAC,EAAE,EACH,CAAC;gBACD,MAAM,KAAK,GAAG,uBAAuB,CAAC,GAAG,EAAE,CAAC;gBAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,MAAM;gBACR,CAAC;gBACD,MAAM,KAAK,GACT,KAAK,CAAC,MAAM;qBACT,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;oBAC/C,EAAE,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;qBACzB,IAAI,EAAE,IAAI,MAAM,CAAC,gBAAgB,CAAC;gBACvC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;gBACxC,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;gBAElD,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW;oBACvC,CAAC,CAAC,iBAAiB,MAAM,CAAC,WAAW,EAAE;oBACvC,CAAC,CAAC,EAAE,CAAC;gBACP,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,CACtC,MAAM,KAAK,CAAC,GAAG,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CACvF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC;IAlDC,CAAC;CAmDL;AAxDD,0DAwDC"}
|
package/package.json
CHANGED
|
@@ -32,7 +32,6 @@ describe('CLI', () => {
|
|
|
32
32
|
this: StartPreparationUseCase,
|
|
33
33
|
) {
|
|
34
34
|
this.run = mockRun;
|
|
35
|
-
this.maximumPreparingIssuesCount = 6;
|
|
36
35
|
return this;
|
|
37
36
|
});
|
|
38
37
|
|
|
@@ -56,9 +55,227 @@ describe('CLI', () => {
|
|
|
56
55
|
awaitingWorkspaceStatus: 'Awaiting',
|
|
57
56
|
preparationStatus: 'Preparing',
|
|
58
57
|
defaultAgentName: 'agent1',
|
|
58
|
+
logFilePath: undefined,
|
|
59
|
+
maximumPreparingIssuesCount: null,
|
|
59
60
|
});
|
|
60
61
|
});
|
|
61
62
|
|
|
63
|
+
it('should pass logFilePath to StartPreparationUseCase when provided', async () => {
|
|
64
|
+
const mockRun = jest.fn().mockResolvedValue(undefined);
|
|
65
|
+
const MockedStartPreparationUseCase = jest.mocked(StartPreparationUseCase);
|
|
66
|
+
|
|
67
|
+
MockedStartPreparationUseCase.mockImplementation(function (
|
|
68
|
+
this: StartPreparationUseCase,
|
|
69
|
+
) {
|
|
70
|
+
this.run = mockRun;
|
|
71
|
+
return this;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
await program.parseAsync([
|
|
75
|
+
'node',
|
|
76
|
+
'test',
|
|
77
|
+
'startDaemon',
|
|
78
|
+
'--projectUrl',
|
|
79
|
+
'https://github.com/test/project',
|
|
80
|
+
'--awaitingWorkspaceStatus',
|
|
81
|
+
'Awaiting',
|
|
82
|
+
'--preparationStatus',
|
|
83
|
+
'Preparing',
|
|
84
|
+
'--defaultAgentName',
|
|
85
|
+
'agent1',
|
|
86
|
+
'--logFilePath',
|
|
87
|
+
'/path/to/log.txt',
|
|
88
|
+
]);
|
|
89
|
+
|
|
90
|
+
expect(mockRun).toHaveBeenCalledTimes(1);
|
|
91
|
+
expect(mockRun).toHaveBeenCalledWith({
|
|
92
|
+
projectUrl: 'https://github.com/test/project',
|
|
93
|
+
awaitingWorkspaceStatus: 'Awaiting',
|
|
94
|
+
preparationStatus: 'Preparing',
|
|
95
|
+
defaultAgentName: 'agent1',
|
|
96
|
+
logFilePath: '/path/to/log.txt',
|
|
97
|
+
maximumPreparingIssuesCount: null,
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('should pass maximumPreparingIssuesCount to StartPreparationUseCase when provided', async () => {
|
|
102
|
+
const mockRun = jest.fn().mockResolvedValue(undefined);
|
|
103
|
+
const MockedStartPreparationUseCase = jest.mocked(StartPreparationUseCase);
|
|
104
|
+
|
|
105
|
+
MockedStartPreparationUseCase.mockImplementation(function (
|
|
106
|
+
this: StartPreparationUseCase,
|
|
107
|
+
) {
|
|
108
|
+
this.run = mockRun;
|
|
109
|
+
return this;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
await program.parseAsync([
|
|
113
|
+
'node',
|
|
114
|
+
'test',
|
|
115
|
+
'startDaemon',
|
|
116
|
+
'--projectUrl',
|
|
117
|
+
'https://github.com/test/project',
|
|
118
|
+
'--awaitingWorkspaceStatus',
|
|
119
|
+
'Awaiting',
|
|
120
|
+
'--preparationStatus',
|
|
121
|
+
'Preparing',
|
|
122
|
+
'--defaultAgentName',
|
|
123
|
+
'agent1',
|
|
124
|
+
'--maximumPreparingIssuesCount',
|
|
125
|
+
'10',
|
|
126
|
+
]);
|
|
127
|
+
|
|
128
|
+
expect(mockRun).toHaveBeenCalledTimes(1);
|
|
129
|
+
expect(mockRun).toHaveBeenCalledWith({
|
|
130
|
+
projectUrl: 'https://github.com/test/project',
|
|
131
|
+
awaitingWorkspaceStatus: 'Awaiting',
|
|
132
|
+
preparationStatus: 'Preparing',
|
|
133
|
+
defaultAgentName: 'agent1',
|
|
134
|
+
logFilePath: undefined,
|
|
135
|
+
maximumPreparingIssuesCount: 10,
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('should exit with error for non-numeric maximumPreparingIssuesCount', async () => {
|
|
140
|
+
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation();
|
|
141
|
+
const processExitSpy = jest
|
|
142
|
+
.spyOn(process, 'exit')
|
|
143
|
+
.mockImplementation(() => {
|
|
144
|
+
throw new Error('process.exit called');
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
await expect(
|
|
148
|
+
program.parseAsync([
|
|
149
|
+
'node',
|
|
150
|
+
'test',
|
|
151
|
+
'startDaemon',
|
|
152
|
+
'--projectUrl',
|
|
153
|
+
'https://github.com/test/project',
|
|
154
|
+
'--awaitingWorkspaceStatus',
|
|
155
|
+
'Awaiting',
|
|
156
|
+
'--preparationStatus',
|
|
157
|
+
'Preparing',
|
|
158
|
+
'--defaultAgentName',
|
|
159
|
+
'agent1',
|
|
160
|
+
'--maximumPreparingIssuesCount',
|
|
161
|
+
'abc',
|
|
162
|
+
]),
|
|
163
|
+
).rejects.toThrow('process.exit called');
|
|
164
|
+
|
|
165
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
166
|
+
'Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.',
|
|
167
|
+
);
|
|
168
|
+
expect(processExitSpy).toHaveBeenCalledWith(1);
|
|
169
|
+
|
|
170
|
+
consoleErrorSpy.mockRestore();
|
|
171
|
+
processExitSpy.mockRestore();
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('should exit with error for negative maximumPreparingIssuesCount', async () => {
|
|
175
|
+
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation();
|
|
176
|
+
const processExitSpy = jest
|
|
177
|
+
.spyOn(process, 'exit')
|
|
178
|
+
.mockImplementation(() => {
|
|
179
|
+
throw new Error('process.exit called');
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
await expect(
|
|
183
|
+
program.parseAsync([
|
|
184
|
+
'node',
|
|
185
|
+
'test',
|
|
186
|
+
'startDaemon',
|
|
187
|
+
'--projectUrl',
|
|
188
|
+
'https://github.com/test/project',
|
|
189
|
+
'--awaitingWorkspaceStatus',
|
|
190
|
+
'Awaiting',
|
|
191
|
+
'--preparationStatus',
|
|
192
|
+
'Preparing',
|
|
193
|
+
'--defaultAgentName',
|
|
194
|
+
'agent1',
|
|
195
|
+
'--maximumPreparingIssuesCount',
|
|
196
|
+
'-5',
|
|
197
|
+
]),
|
|
198
|
+
).rejects.toThrow('process.exit called');
|
|
199
|
+
|
|
200
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
201
|
+
'Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.',
|
|
202
|
+
);
|
|
203
|
+
expect(processExitSpy).toHaveBeenCalledWith(1);
|
|
204
|
+
|
|
205
|
+
consoleErrorSpy.mockRestore();
|
|
206
|
+
processExitSpy.mockRestore();
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it('should exit with error for zero maximumPreparingIssuesCount', async () => {
|
|
210
|
+
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation();
|
|
211
|
+
const processExitSpy = jest
|
|
212
|
+
.spyOn(process, 'exit')
|
|
213
|
+
.mockImplementation(() => {
|
|
214
|
+
throw new Error('process.exit called');
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
await expect(
|
|
218
|
+
program.parseAsync([
|
|
219
|
+
'node',
|
|
220
|
+
'test',
|
|
221
|
+
'startDaemon',
|
|
222
|
+
'--projectUrl',
|
|
223
|
+
'https://github.com/test/project',
|
|
224
|
+
'--awaitingWorkspaceStatus',
|
|
225
|
+
'Awaiting',
|
|
226
|
+
'--preparationStatus',
|
|
227
|
+
'Preparing',
|
|
228
|
+
'--defaultAgentName',
|
|
229
|
+
'agent1',
|
|
230
|
+
'--maximumPreparingIssuesCount',
|
|
231
|
+
'0',
|
|
232
|
+
]),
|
|
233
|
+
).rejects.toThrow('process.exit called');
|
|
234
|
+
|
|
235
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
236
|
+
'Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.',
|
|
237
|
+
);
|
|
238
|
+
expect(processExitSpy).toHaveBeenCalledWith(1);
|
|
239
|
+
|
|
240
|
+
consoleErrorSpy.mockRestore();
|
|
241
|
+
processExitSpy.mockRestore();
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
it('should exit with error for decimal maximumPreparingIssuesCount', async () => {
|
|
245
|
+
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation();
|
|
246
|
+
const processExitSpy = jest
|
|
247
|
+
.spyOn(process, 'exit')
|
|
248
|
+
.mockImplementation(() => {
|
|
249
|
+
throw new Error('process.exit called');
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
await expect(
|
|
253
|
+
program.parseAsync([
|
|
254
|
+
'node',
|
|
255
|
+
'test',
|
|
256
|
+
'startDaemon',
|
|
257
|
+
'--projectUrl',
|
|
258
|
+
'https://github.com/test/project',
|
|
259
|
+
'--awaitingWorkspaceStatus',
|
|
260
|
+
'Awaiting',
|
|
261
|
+
'--preparationStatus',
|
|
262
|
+
'Preparing',
|
|
263
|
+
'--defaultAgentName',
|
|
264
|
+
'agent1',
|
|
265
|
+
'--maximumPreparingIssuesCount',
|
|
266
|
+
'3.5',
|
|
267
|
+
]),
|
|
268
|
+
).rejects.toThrow('process.exit called');
|
|
269
|
+
|
|
270
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
271
|
+
'Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.',
|
|
272
|
+
);
|
|
273
|
+
expect(processExitSpy).toHaveBeenCalledWith(1);
|
|
274
|
+
|
|
275
|
+
consoleErrorSpy.mockRestore();
|
|
276
|
+
processExitSpy.mockRestore();
|
|
277
|
+
});
|
|
278
|
+
|
|
62
279
|
it('should pass correct parameters to NotifyFinishedIssuePreparationUseCase', async () => {
|
|
63
280
|
const mockRun = jest.fn().mockResolvedValue(undefined);
|
|
64
281
|
const MockedNotifyFinishedUseCase = jest.mocked(
|
|
@@ -14,6 +14,8 @@ type StartDaemonOptions = {
|
|
|
14
14
|
awaitingWorkspaceStatus: string;
|
|
15
15
|
preparationStatus: string;
|
|
16
16
|
defaultAgentName: string;
|
|
17
|
+
logFilePath?: string;
|
|
18
|
+
maximumPreparingIssuesCount?: string;
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
type NotifyFinishedOptions = {
|
|
@@ -41,6 +43,11 @@ program
|
|
|
41
43
|
'Status for issues in preparation',
|
|
42
44
|
)
|
|
43
45
|
.requiredOption('--defaultAgentName <name>', 'Default agent name')
|
|
46
|
+
.option('--logFilePath <path>', 'Path to log file')
|
|
47
|
+
.option(
|
|
48
|
+
'--maximumPreparingIssuesCount <count>',
|
|
49
|
+
'Maximum number of issues in preparation status (default: 6)',
|
|
50
|
+
)
|
|
44
51
|
.action(async (options: StartDaemonOptions) => {
|
|
45
52
|
const token = process.env.GH_TOKEN;
|
|
46
53
|
if (!token) {
|
|
@@ -58,11 +65,29 @@ program
|
|
|
58
65
|
localCommandRunner,
|
|
59
66
|
);
|
|
60
67
|
|
|
68
|
+
let maximumPreparingIssuesCount: number | null = null;
|
|
69
|
+
if (options.maximumPreparingIssuesCount !== undefined) {
|
|
70
|
+
const parsedCount = Number(options.maximumPreparingIssuesCount);
|
|
71
|
+
if (
|
|
72
|
+
!Number.isFinite(parsedCount) ||
|
|
73
|
+
!Number.isInteger(parsedCount) ||
|
|
74
|
+
parsedCount <= 0
|
|
75
|
+
) {
|
|
76
|
+
console.error(
|
|
77
|
+
'Invalid value for --maximumPreparingIssuesCount. It must be a positive integer.',
|
|
78
|
+
);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
maximumPreparingIssuesCount = parsedCount;
|
|
82
|
+
}
|
|
83
|
+
|
|
61
84
|
await useCase.run({
|
|
62
85
|
projectUrl: options.projectUrl,
|
|
63
86
|
awaitingWorkspaceStatus: options.awaitingWorkspaceStatus,
|
|
64
87
|
preparationStatus: options.preparationStatus,
|
|
65
88
|
defaultAgentName: options.defaultAgentName,
|
|
89
|
+
logFilePath: options.logFilePath,
|
|
90
|
+
maximumPreparingIssuesCount,
|
|
66
91
|
});
|
|
67
92
|
});
|
|
68
93
|
|
|
@@ -58,6 +58,7 @@ describe('StartPreparationUseCase', () => {
|
|
|
58
58
|
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
59
59
|
preparationStatus: 'Preparation',
|
|
60
60
|
defaultAgentName: 'agent1',
|
|
61
|
+
maximumPreparingIssuesCount: null,
|
|
61
62
|
});
|
|
62
63
|
expect(mockIssueRepository.update.mock.calls).toHaveLength(1);
|
|
63
64
|
expect(mockIssueRepository.update.mock.calls[0][0]).toMatchObject({
|
|
@@ -99,6 +100,7 @@ describe('StartPreparationUseCase', () => {
|
|
|
99
100
|
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
100
101
|
preparationStatus: 'Preparation',
|
|
101
102
|
defaultAgentName: 'agent1',
|
|
103
|
+
maximumPreparingIssuesCount: null,
|
|
102
104
|
});
|
|
103
105
|
expect(mockIssueRepository.update.mock.calls).toHaveLength(1);
|
|
104
106
|
expect(mockIssueRepository.update.mock.calls[0][0]).toMatchObject({
|
|
@@ -135,6 +137,7 @@ describe('StartPreparationUseCase', () => {
|
|
|
135
137
|
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
136
138
|
preparationStatus: 'Preparation',
|
|
137
139
|
defaultAgentName: 'agent1',
|
|
140
|
+
maximumPreparingIssuesCount: null,
|
|
138
141
|
});
|
|
139
142
|
const issue7UpdateCalls = mockIssueRepository.update.mock.calls.filter(
|
|
140
143
|
(call) => call[0].id === '7',
|
|
@@ -142,6 +145,65 @@ describe('StartPreparationUseCase', () => {
|
|
|
142
145
|
expect(issue7UpdateCalls).toHaveLength(0);
|
|
143
146
|
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(0);
|
|
144
147
|
});
|
|
148
|
+
it('should append logFilePath to aw command when provided', async () => {
|
|
149
|
+
const awaitingIssues: Issue[] = [
|
|
150
|
+
{
|
|
151
|
+
id: '1',
|
|
152
|
+
url: 'url1',
|
|
153
|
+
title: 'Issue 1',
|
|
154
|
+
labels: ['category:impl'],
|
|
155
|
+
status: 'Awaiting Workspace',
|
|
156
|
+
},
|
|
157
|
+
];
|
|
158
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
159
|
+
mockIssueRepository.getAllOpened.mockResolvedValueOnce(awaitingIssues);
|
|
160
|
+
mockLocalCommandRunner.runCommand.mockResolvedValue({
|
|
161
|
+
stdout: '',
|
|
162
|
+
stderr: '',
|
|
163
|
+
exitCode: 0,
|
|
164
|
+
});
|
|
165
|
+
await useCase.run({
|
|
166
|
+
projectUrl: 'https://github.com/user/repo',
|
|
167
|
+
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
168
|
+
preparationStatus: 'Preparation',
|
|
169
|
+
defaultAgentName: 'agent1',
|
|
170
|
+
logFilePath: '/path/to/log.txt',
|
|
171
|
+
maximumPreparingIssuesCount: null,
|
|
172
|
+
});
|
|
173
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(1);
|
|
174
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][0]).toBe(
|
|
175
|
+
'aw url1 impl https://github.com/user/repo --logFilePath /path/to/log.txt',
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
it('should not append logFilePath to aw command when not provided', async () => {
|
|
179
|
+
const awaitingIssues: Issue[] = [
|
|
180
|
+
{
|
|
181
|
+
id: '1',
|
|
182
|
+
url: 'url1',
|
|
183
|
+
title: 'Issue 1',
|
|
184
|
+
labels: ['category:impl'],
|
|
185
|
+
status: 'Awaiting Workspace',
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
189
|
+
mockIssueRepository.getAllOpened.mockResolvedValueOnce(awaitingIssues);
|
|
190
|
+
mockLocalCommandRunner.runCommand.mockResolvedValue({
|
|
191
|
+
stdout: '',
|
|
192
|
+
stderr: '',
|
|
193
|
+
exitCode: 0,
|
|
194
|
+
});
|
|
195
|
+
await useCase.run({
|
|
196
|
+
projectUrl: 'https://github.com/user/repo',
|
|
197
|
+
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
198
|
+
preparationStatus: 'Preparation',
|
|
199
|
+
defaultAgentName: 'agent1',
|
|
200
|
+
maximumPreparingIssuesCount: null,
|
|
201
|
+
});
|
|
202
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(1);
|
|
203
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls[0][0]).toBe(
|
|
204
|
+
'aw url1 impl https://github.com/user/repo',
|
|
205
|
+
);
|
|
206
|
+
});
|
|
145
207
|
it('should handle defensive break when pop returns undefined', async () => {
|
|
146
208
|
const awaitingIssue: Issue = {
|
|
147
209
|
id: '1',
|
|
@@ -179,8 +241,59 @@ describe('StartPreparationUseCase', () => {
|
|
|
179
241
|
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
180
242
|
preparationStatus: 'Preparation',
|
|
181
243
|
defaultAgentName: 'agent1',
|
|
244
|
+
maximumPreparingIssuesCount: null,
|
|
182
245
|
});
|
|
183
246
|
expect(mockIssueRepository.update.mock.calls).toHaveLength(1);
|
|
184
247
|
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(1);
|
|
185
248
|
});
|
|
249
|
+
it('should use custom maximumPreparingIssuesCount when provided', async () => {
|
|
250
|
+
const awaitingIssues: Issue[] = Array.from({ length: 10 }, (_, i) => ({
|
|
251
|
+
id: `${i + 1}`,
|
|
252
|
+
url: `url${i + 1}`,
|
|
253
|
+
title: `Issue ${i + 1}`,
|
|
254
|
+
labels: [],
|
|
255
|
+
status: 'Awaiting Workspace',
|
|
256
|
+
}));
|
|
257
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
258
|
+
mockIssueRepository.getAllOpened.mockResolvedValueOnce(awaitingIssues);
|
|
259
|
+
mockLocalCommandRunner.runCommand.mockResolvedValue({
|
|
260
|
+
stdout: '',
|
|
261
|
+
stderr: '',
|
|
262
|
+
exitCode: 0,
|
|
263
|
+
});
|
|
264
|
+
await useCase.run({
|
|
265
|
+
projectUrl: 'https://github.com/user/repo',
|
|
266
|
+
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
267
|
+
preparationStatus: 'Preparation',
|
|
268
|
+
defaultAgentName: 'agent1',
|
|
269
|
+
maximumPreparingIssuesCount: 3,
|
|
270
|
+
});
|
|
271
|
+
expect(mockIssueRepository.update.mock.calls).toHaveLength(3);
|
|
272
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(3);
|
|
273
|
+
});
|
|
274
|
+
it('should use default maximumPreparingIssuesCount of 6 when null is provided', async () => {
|
|
275
|
+
const awaitingIssues: Issue[] = Array.from({ length: 12 }, (_, i) => ({
|
|
276
|
+
id: `${i + 1}`,
|
|
277
|
+
url: `url${i + 1}`,
|
|
278
|
+
title: `Issue ${i + 1}`,
|
|
279
|
+
labels: [],
|
|
280
|
+
status: 'Awaiting Workspace',
|
|
281
|
+
}));
|
|
282
|
+
mockProjectRepository.getByUrl.mockResolvedValue(mockProject);
|
|
283
|
+
mockIssueRepository.getAllOpened.mockResolvedValueOnce(awaitingIssues);
|
|
284
|
+
mockLocalCommandRunner.runCommand.mockResolvedValue({
|
|
285
|
+
stdout: '',
|
|
286
|
+
stderr: '',
|
|
287
|
+
exitCode: 0,
|
|
288
|
+
});
|
|
289
|
+
await useCase.run({
|
|
290
|
+
projectUrl: 'https://github.com/user/repo',
|
|
291
|
+
awaitingWorkspaceStatus: 'Awaiting Workspace',
|
|
292
|
+
preparationStatus: 'Preparation',
|
|
293
|
+
defaultAgentName: 'agent1',
|
|
294
|
+
maximumPreparingIssuesCount: null,
|
|
295
|
+
});
|
|
296
|
+
expect(mockIssueRepository.update.mock.calls).toHaveLength(6);
|
|
297
|
+
expect(mockLocalCommandRunner.runCommand.mock.calls).toHaveLength(6);
|
|
298
|
+
});
|
|
186
299
|
});
|
|
@@ -3,7 +3,6 @@ import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
|
|
|
3
3
|
import { LocalCommandRunner } from './adapter-interfaces/LocalCommandRunner';
|
|
4
4
|
|
|
5
5
|
export class StartPreparationUseCase {
|
|
6
|
-
maximumPreparingIssuesCount = 6;
|
|
7
6
|
constructor(
|
|
8
7
|
private readonly projectRepository: ProjectRepository,
|
|
9
8
|
private readonly issueRepository: IssueRepository,
|
|
@@ -15,7 +14,10 @@ export class StartPreparationUseCase {
|
|
|
15
14
|
awaitingWorkspaceStatus: string;
|
|
16
15
|
preparationStatus: string;
|
|
17
16
|
defaultAgentName: string;
|
|
17
|
+
logFilePath?: string;
|
|
18
|
+
maximumPreparingIssuesCount: number | null;
|
|
18
19
|
}): Promise<void> => {
|
|
20
|
+
const maximumPreparingIssuesCount = params.maximumPreparingIssuesCount ?? 6;
|
|
19
21
|
const project = await this.projectRepository.getByUrl(params.projectUrl);
|
|
20
22
|
|
|
21
23
|
const allIssues = await this.issueRepository.getAllOpened(project);
|
|
@@ -31,7 +33,7 @@ export class StartPreparationUseCase {
|
|
|
31
33
|
let i = currentPreparationIssueCount;
|
|
32
34
|
i <
|
|
33
35
|
Math.min(
|
|
34
|
-
|
|
36
|
+
maximumPreparingIssuesCount,
|
|
35
37
|
awaitingWorkspaceIssues.length + currentPreparationIssueCount,
|
|
36
38
|
);
|
|
37
39
|
i++
|
|
@@ -48,8 +50,11 @@ export class StartPreparationUseCase {
|
|
|
48
50
|
issue.status = params.preparationStatus;
|
|
49
51
|
await this.issueRepository.update(issue, project);
|
|
50
52
|
|
|
53
|
+
const logFilePathArg = params.logFilePath
|
|
54
|
+
? `--logFilePath ${params.logFilePath}`
|
|
55
|
+
: '';
|
|
51
56
|
await this.localCommandRunner.runCommand(
|
|
52
|
-
`aw ${issue.url} ${agent} ${project.url}`,
|
|
57
|
+
`aw ${issue.url} ${agent} ${project.url}${logFilePathArg ? ` ${logFilePathArg}` : ''}`,
|
|
53
58
|
);
|
|
54
59
|
}
|
|
55
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AA2G9B,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -5,13 +5,14 @@ export declare class StartPreparationUseCase {
|
|
|
5
5
|
private readonly projectRepository;
|
|
6
6
|
private readonly issueRepository;
|
|
7
7
|
private readonly localCommandRunner;
|
|
8
|
-
maximumPreparingIssuesCount: number;
|
|
9
8
|
constructor(projectRepository: ProjectRepository, issueRepository: IssueRepository, localCommandRunner: LocalCommandRunner);
|
|
10
9
|
run: (params: {
|
|
11
10
|
projectUrl: string;
|
|
12
11
|
awaitingWorkspaceStatus: string;
|
|
13
12
|
preparationStatus: string;
|
|
14
13
|
defaultAgentName: string;
|
|
14
|
+
logFilePath?: string;
|
|
15
|
+
maximumPreparingIssuesCount: number | null;
|
|
15
16
|
}) => Promise<void>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=StartPreparationUseCase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartPreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,qBAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"StartPreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/StartPreparationUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAFlB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB;IAGzD,GAAG,GAAU,QAAQ;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,uBAAuB,EAAE,MAAM,CAAC;QAChC,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5C,KAAG,OAAO,CAAC,IAAI,CAAC,CAyCf;CACH"}
|