Add success handling to update_reaction job#2019
Merged
Conversation
- Updated notify_comment_error.cjs to handle success cases with ✅ emoji - Changed step name from "error notification" to "completion status" - Updated comments in notify_comment.go to reflect both success and failure handling - Added comprehensive test coverage for all agent conclusion states (success, failure, cancelled, timed_out, skipped) - All tests pass including new JavaScript tests and existing Go tests - Updated workflow lock files to reflect the changes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add comment creation on successful run
Add success handling to update_reaction job
Oct 20, 2025
pelikhan
approved these changes
Oct 20, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
update_reactionjob was only creating comments when the agent failed, cancelled, timed out, or was skipped. When an agentic workflow completed successfully, no notification was posted to the activation comment, leaving users without clear feedback about successful completions.Solution
Updated the notification system to handle both success and failure cases with appropriate messages and emojis. The
update_reactionjob now provides clear visibility into workflow outcomes directly in GitHub issues, pull requests, and discussions.Changes
Message Handling
The script now distinguishes between success and failure cases:
Success:
Failure:
Other states (cancelled, skipped, timed_out) continue to show appropriate emojis and messages.
Code Updates
pkg/workflow/js/notify_comment_error.cjs: Added success case handling with ✅ emoji and restructured message logic to handle all agent conclusion statespkg/workflow/notify_comment.go: Updated function comment and step name from "error notification" to "completion status" to reflect the broader scopepkg/workflow/notify_comment_test.go: Updated test to validate the new step nameTest Coverage
Added comprehensive test file
pkg/workflow/js/notify_comment_error.test.cjswith 11 tests covering:Impact
Testing
✅ All Go unit tests pass
✅ All JavaScript tests pass (11 new tests)
✅ Build completes successfully
✅ Code properly formatted
✅ Code review completed with no issues
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.