Skip to content

[Done] chore: apply changes for Issue #616 - #621

Closed
github-actions[bot] wants to merge 2 commits into
mainfrom
codez-chore-616-apply-changes-for-issue-616-3981147485
Closed

[Done] chore: apply changes for Issue #616#621
github-actions[bot] wants to merge 2 commits into
mainfrom
codez-chore-616-apply-changes-for-issue-616-3981147485

Conversation

@github-actions

@github-actions github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown

Closes #616

Applied changes based on Issue #616.

Implemented the refactor by splitting runAction into explicit phases with a shared context object in src/github/runAction.ts.

What changed:

  • Added RunActionContext to carry explicit data flow across phases (progressCommentId, originalFileState, prompt, downloadedImageFiles, output).
  • Extracted orchestration into:
    1. initializeAction(...)
    2. executeAction(...)
    3. finalizeAction(...)
  • Kept behavior consistent:
    • Same initial reaction/title/progress setup
    • Same prompt prep and Codex execution/masking
    • Same createIssues branch handling
    • Same change detection + handleResult path
    • Same error comment on Codex execution failure
    • Same final title update + reactions on successful completion

Validation:

  • npm run build passes.
  • Repo-wide lint/test are currently failing due pre-existing project issues (not introduced by this refactor), so I validated via build and diff-level behavior preservation.

@YiweiShen

Copy link
Copy Markdown
Owner

/codex Resolve the conflict

@github-actions github-actions Bot changed the title chore: apply changes for Issue #616 [WIP] chore: apply changes for Issue #616 Mar 1, 2026
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Author

Resolved the conflict in src/github/runAction.ts.

What I changed

  • Replaced if (!executionResult.success) with if (executionResult.success === false).
  • Extracted errorMessage inside that branch and used it for the failure comment.

This resolves the union-type conflict around executionResult.errorMessage access in the failure path.

Verification

  • Ran: npx tsc --noEmit --pretty false src/github/runAction.ts 2>&1 | grep "runAction.ts"
  • Result: no runAction.ts type errors after the patch.

@github-actions github-actions Bot changed the title [WIP] chore: apply changes for Issue #616 [Done] chore: apply changes for Issue #616 Mar 1, 2026
@YiweiShen YiweiShen closed this Mar 1, 2026
@YiweiShen
YiweiShen deleted the codez-chore-616-apply-changes-for-issue-616-3981147485 branch March 1, 2026 22:19
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.

[Done] Split runAction into explicit initialize/execute/finalize phases

1 participant