Skip to content

Conversation

github-actions[bot]
Copy link

Closes #514

Applied changes based on Issue #514.

I’ve added automatic title‐prefix updates around the “issuesAssigned” workflow in runAction, per your spec:

  • When work begins (upon assignment), strip any existing [WIP] or [Done] prefix and prepend [WIP] to the issue title.
  • When work completes (after the Codex run and results are applied), strip any existing [WIP] or [Done] prefix and prepend [Done].

These changes live in src/github/runAction.ts:

// After adding the “👁️” reaction, mark the issue as WIP
if (agentEvent.type === 'issuesAssigned') {
  const issueNumber = agentEvent.github.issue.number;
  const originalTitle = agentEvent.github.issue.title;
  const strippedTitle = originalTitle.replace(/^\[(?:WIP|Done)\]\s*/, '');
  const newTitle = `[WIP] ${strippedTitle}`;
  core.info(`Updating issue #${issueNumber} title to '${newTitle}'`);
  await octokit.rest.issues.update({ ...repo, issue_number: issueNumber, title: newTitle });
}

// … later, after handleResult(), just before wrapping up …

// When work completes, update the prefix to Done
if (agentEvent.type === 'issuesAssigned') {
  const issueNumber = agentEvent.github.issue.number;
  const originalTitle = agentEvent.github.issue.title;
  const strippedTitle = originalTitle.replace(/^\[(?:WIP|Done)\]\s*/, '');
  const newTitle = `[Done] ${strippedTitle}`;
  core.info(`Updating issue #${issueNumber} title to '${newTitle}'`);
  await octokit.rest.issues.update({ ...repo, issue_number: issueNumber, title: newTitle });
}

【F:src/github/runAction.ts†L53-L70】【F:src/github/runAction.ts†L260-L278】

With these edits, any configured “assignee-trigger” user assignment will automatically flag the issue as in‑progress and then mark it done when Codez finishes. Let me know if you need anything else!

@github-actions github-actions bot mentioned this pull request Jul 25, 2025
@YiweiShen YiweiShen merged commit faf2147 into main Jul 25, 2025
3 checks passed
@YiweiShen YiweiShen deleted the codez-chore-514-feat-github-add-wip-done-prefix-toggling-for-issue-titles branch July 25, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Feature

1 participant