@juangcarmona/lighthouse-sdlc 0.18.2 → 0.18.3
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/package.json +1 -1
- package/src/epic-native.mjs +1 -2
package/package.json
CHANGED
package/src/epic-native.mjs
CHANGED
|
@@ -140,8 +140,7 @@ export async function checkEpicCapacity({ api, repository, owner, child, current
|
|
|
140
140
|
if (!Array.isArray(candidates) || candidates.length !== 1) throw Error('Epic child inventory is incomplete or ambiguous');
|
|
141
141
|
const issue = await api(`issues/${candidates[0].number}`);
|
|
142
142
|
if (issue.id !== candidates[0].id || issue.user?.login !== 'github-actions[bot]' || issue.user.type !== 'Bot' || !isDeepStrictEqual(readEpicMarker(issue.body), correlation)) throw Error('Epic child inventory changed');
|
|
143
|
-
if (issue.state
|
|
144
|
-
if (issue.state !== 'open' || issue.pull_request) throw Error('Epic child state is uncertain');
|
|
143
|
+
if (!['open', 'closed'].includes(issue.state) || issue.pull_request) throw Error('Epic child state is uncertain');
|
|
145
144
|
const comments = await issueComments(api, issue.number);
|
|
146
145
|
const active = comments.filter(comment => comment.user?.login === 'github-actions[bot]' && comment.user.type === 'Bot' && comment.body?.includes('<!-- lighthouse-dispatch:')).map(comment => readDispatchReceipt(comment, repository, issue.number)).some(receipt => receipt.stage === 'implement' && receipt.id !== excludeRequest && ['requested', 'running', 'unknown'].includes(receipt.status));
|
|
147
146
|
if (active || issue.number !== child && issue.labels.some(label => label.name === 'agent-working')) occupied++;
|