Skip to content

Generate update_reaction job for command workflows with reactions - #2552

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-update-reaction-job
Oct 26, 2025
Merged

Generate update_reaction job for command workflows with reactions#2552
pelikhan merged 2 commits into
mainfrom
copilot/add-update-reaction-job

Conversation

CopilotAI commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

Command workflows automatically enable the "eyes" reaction and create an activation comment, but update_reaction job was only generated when add-comment was configured in safe-outputs, leaving the activation comment unupdated on workflow completion.

Changes

Modified buildUpdateReactionJob() to generate job when:

  • add-comment is configured with a reaction (existing), OR
  • command is configured with a reaction (new)

Updated buildSafeOutputsJobs() to:

  • Always attempt job creation, delegating decision to buildUpdateReactionJob()
  • Remove conditional guard that required add-comment configuration

Impact

Command workflows (mergefest, plan, tidy) now update activation comments with completion status (✅ success, ❌ failure, 🚫 cancelled, etc.) regardless of add-comment configuration.

# This now generates update_reaction jobon:
command:
name: mergefestsafe-outputs:
push-to-pull-request-branch: # No add-comment needed
Original prompt

Analyze mergefest.md . Since it is using command, the lock file should have the update_reaction job added but it does not seem to have it. Review the logic the enable the update_reaction job such that if (1) command is a trigger and reaction is enabled, it is generated.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Add update_reaction job logic to mergefestGenerate update_reaction job for command workflows with reactionsOct 26, 2025
CopilotAI requested a review from pelikhanOctober 26, 2025 16:19
@pelikhan
pelikhan marked this pull request as ready for review October 26, 2025 16:20
CopilotAI review requested due to automatic review settings October 26, 2025 16:20

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where command workflows (mergefest, plan, tidy) were not updating their activation comments upon completion, despite reactions being enabled. The issue stemmed from the update_reaction job only being generated when add-comment was configured, whereas command workflows create activation comments automatically but may not have add-comment configured.

Key changes:

  • Modified job generation logic to create update_reaction job when either add-comment OR command is configured with reactions
  • Removed restrictive conditional guard in buildSafeOutputsJobs() that prevented job creation for command-only workflows
  • Added comprehensive test coverage for command workflow scenarios

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
pkg/workflow/notify_comment.goUpdated logic to generate update_reaction job for both add-comment and command triggers with reactions
pkg/workflow/compiler_jobs.goRemoved conditional guard preventing update_reaction job creation for command workflows
pkg/workflow/notify_comment_test.goAdded test cases for command workflow scenarios with and without reactions
.github/workflows/tidy.lock.ymlGenerated update_reaction job for tidy command workflow
.github/workflows/plan.lock.ymlGenerated update_reaction job for plan command workflow
.github/workflows/mergefest.lock.ymlGenerated update_reaction job for mergefest command workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request.

@pelikhan
pelikhan merged commit 2e4c509 into mainOct 26, 2025
63 of 69 checks passed
@pelikhan
pelikhan deleted the copilot/add-update-reaction-job branch October 26, 2025 16:21
@github-actionsgithub-actionsBot mentioned this pull request Mar 30, 2026
Sign up for freeto 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.

3 participants

@pelikhan