@juangcarmona/lighthouse-sdlc 0.30.0 → 0.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juangcarmona/lighthouse-sdlc",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "type": "module",
5
5
  "description": "Provider-neutral SDLC skills, commands and route contracts for Lighthouse adopters",
6
6
  "repository": {
@@ -389,12 +389,14 @@ async function main(command) {
389
389
  const issuePath = `issues/${issueNumber}`;
390
390
  const comments = () => issueComments(api, issueNumber);
391
391
  const ownerAnswers = all => ownerIntentComments(all, owner);
392
+ let pendingIssueReply;
392
393
  if (['route', 'prepare', 'dispatch-prepare'].includes(command) && env.GITHUB_EVENT_NAME === 'issue_comment' && !proposalReview && !implementationReview && !productApproval) {
393
394
  const fresh = await api(issuePath);
394
395
  const currentComments = await comments();
396
+ if (event.action === 'created' && fresh.labels.some(label => ['needs-info', 'waiting-review'].includes(label.name))) pendingIssueReply = pendingReply(event, currentComments);
395
397
  route = clientRequest ? clientDispatchRoute(clientRequest, dispatch.request, fresh, currentComments)
396
398
  : routeIssue({ ...event, issue: fresh }, env.GITHUB_ACTOR, owner, env.GITHUB_EVENT_NAME, currentComments);
397
- if (command === 'route' && env.GITHUB_ACTOR === owner && event.comment?.user?.login === owner && event.comment.user.type !== 'Bot') {
399
+ if (command === 'route' && pendingIssueReply && env.GITHUB_ACTOR === owner && event.comment?.user?.login === owner && event.comment.user.type !== 'Bot') {
398
400
  await api(`issues/comments/${event.comment.id}/reactions`, 'POST', { content: 'eyes' });
399
401
  }
400
402
  }
@@ -503,7 +505,7 @@ async function main(command) {
503
505
  const routedDetails = `[Routing execution](https://github.com/${repo}/actions/runs/${env.GITHUB_RUN_ID})`;
504
506
  if (implementationReview) await publishRoutingHandoff(api, implementationReview.number, `${repo}:review:${feedbackKey(implementationReview)}`, renderHandoff({ status: route.run ? 'requested' : 'blocked', stage: route.stage ?? 'implement', happened: implementationReview.handled ? 'This feedback has already been applied.' : route.reason, action: implementationReview.handled ? 'Owner: review the latest PR state.' : route.run ? 'None. Wait for the result.' : 'Owner: follow the stated blocker on this PR.', next: route.run ? 'The workflow will check admission before starting work.' : 'No new worker has been requested by this event.', link: `[Open PR](${implementationReview.url})`, details: routedDetails }));
505
507
  else if (proposalReview) await publishRoutingHandoff(api, proposalReview.number, `${repo}:review:${feedbackKey(proposalReview)}`, renderHandoff({ status: route.run ? 'requested' : 'blocked', stage: route.stage ?? 'propose', happened: proposalReview.handled ? 'This feedback has already been applied.' : proposalReview.approved ? `Approval was received for commit \`${proposalReview.head}\`. Implementation has not started.` : route.reason, action: proposalReview.handled ? 'Owner: review the latest proposal diff.' : route.run ? 'None. Wait for the result.' : 'Owner: follow the stated next step on this PR.', next: route.run ? 'The workflow will check admission before starting work.' : 'No implementation has been authorized by this acknowledgement.', link: `[Open PR](${proposalReview.url})`, details: routedDetails }));
506
- else if (env.GITHUB_EVENT_NAME === 'issue_comment' && env.GITHUB_ACTOR === owner && !route.run) await publishRoutingHandoff(api, issueNumber, `${repo}:issue-comment:${event.comment.id}`, renderHandoff({ status: 'blocked', stage: route.stage ?? 'stage not identified', happened: `No agent started: ${route.reason}.`, action: route.reason === 'Issue reserved' ? 'None. Wait for the current reservation to end.' : 'None. To request work, add the relevant stage label; provide proposal feedback on its PR.', next: 'The workflow starts only after an authorized stage request or an answer to a pending question.', details: routedDetails }));
508
+ else if (pendingIssueReply && env.GITHUB_ACTOR === owner && event.comment?.user?.login === owner && event.comment.user.type !== 'Bot' && !route.run) await publishRoutingHandoff(api, issueNumber, `${repo}:issue-comment:${event.comment.id}`, renderHandoff({ status: 'blocked', stage: route.stage ?? pendingIssueReply.stage, happened: `No agent started: ${route.reason}.`, action: route.reason === 'Issue reserved' ? 'None. Wait for the current reservation to end.' : 'Owner: resolve the stated blocker before requesting continuation.', next: 'The workflow starts only after an authorized stage request or an answer to a pending question.', details: routedDetails }));
507
509
  console.log(route.reason); await summary(`### Routing\n${route.reason}`); return;
508
510
  }
509
511
  if (command === 'prepare') {