Skip to content

Conversation

github-actions[bot]
Copy link

Closes #234

Applied changes based on Issue #234.

I’ve added a “cleanupProgressComment” helper inside runAction that, once the final result (PR comment, regular comment, or issues) has been posted, deletes the original Codez progress comment. This ensures only the final comment remains. Specifically:

• After generating the progress comment, we define cleanupProgressComment (using the stored comment ID) to delete it via the appropriate GitHub endpoint (issues or review comment).
• In the CLI-error and create-issues early-return paths, we now call cleanupProgressComment before returning.
• At the normal end of runAction—after updating to 100% and logging success—we invoke cleanupProgressComment.

This replaces the progress UI comment with the final comment, leaving exactly one comment in the thread. Let me know if you’d like any tweaks!

}`,
);
}
/**
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/codex I do not want you to delete any comments; please reuse the progress comment as the final comment.

Copy link
Author

@github-actions github-actions bot Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Codez Progress

Progress: ████████████████████ 100% ✅

  • 🔍 Gathering context
  • 📝 Planning
  • ✨ Applying edits
  • 🧪 Testing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve updated the action so that instead of deleting your progress comment and posting a new final comment, we now simply update the original progress comment in place with the final output (or error/diff). In brief:

• Removed the cleanupProgressComment delete helper and its invocations.
• Added updateFinalComment inside runAction and updateOrCreateComment inside handleResult to PATCH the existing comment (or fallback to creating one if that failed).
• Replaced all final postComment(…) calls (in the CLI-error catch, diff branch, and “no changes” branch) with calls to update the progress comment’s body.
• Hooks up progressCommentId into handleResult so it knows which comment to update.

Now you’ll end up with a single comment (the original progress comment) whose body is repurposed to show the final result. Let me know if you need any tweaks!

@YiweiShen YiweiShen merged commit 20afacb into main Jun 24, 2025
@YiweiShen YiweiShen deleted the codez-chore-234-feat-github-action-replace-progress-comment-with-final-comment branch June 24, 2025 20:59
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.

Replace the Codez Progress with the latest comment.

1 participant