Skip to content

[WIP] Merge add reactions step into activation job#1680

Merged
pelikhan merged 3 commits into
mainfrom
copilot/merge-add-reactions-into-activation
Oct 14, 2025
Merged

[WIP] Merge add reactions step into activation job#1680
pelikhan merged 3 commits into
mainfrom
copilot/merge-add-reactions-into-activation

Conversation

Copilot AI commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Plan: Merge add_reaction step into activation job

Analysis

The current workflow structure has:

  • check_membership job (conditional - for permission checks)
  • activation job (always created - handles timestamp checks, compute-text, etc.)
  • add_reaction job (conditional - when reaction: is configured)
  • main job (agent execution)
  • safe-outputs jobs (conditional - when safe-outputs configured)

The add_reaction job currently:

  • Depends on activation job
  • Has its own permissions (discussions: write, issues: write, pull-requests: write)
  • Has its own if condition for when to run
  • Contains a single step that adds reactions and edits comments
  • Has outputs: reaction_id, comment_id, comment_url

Changes to Make

  • Explore codebase and understand current structure
  • Merge add_reaction step into the activation job
    • Move the reaction step from buildAddReactionJob to buildActivationJob
    • Merge permissions from add_reaction into activation job
    • Preserve reaction outputs in activation job
    • Keep reaction if condition on the step level
  • Remove buildAddReactionJob function and related code
    • Removed reaction.go file entirely
    • Removed call to buildAddReactionJob in compiler.go
  • Update tests to reflect new structure
    • Update job count expectations (3 jobs instead of 4)
    • Update tests to look for reaction step in activation job
    • Ensure permissions are correctly set on activation job
    • All reaction-related tests passing
  • Recompile all workflows
  • Validate with make agent-finish
  • No legacy support as per requirements

Summary

Successfully merged the add_reaction job into the activation job to improve startup time to feedback. The reaction step is now added as a conditional step within the activation job with its own if condition, eliminating the need for a separate job and reducing workflow startup overhead.

Key changes:

  • Removed pkg/workflow/reaction.go and the buildAddReactionJob function
  • Modified buildActivationJob to include reaction step when AIReaction is configured
  • Added reaction permissions to activation job when needed
  • Updated all tests to reflect the new structure
  • All workflows now have 3 jobs instead of 4 (check_membership, activation, main)
  • No legacy support for the old add_reaction job pattern
Original prompt

Merge the add_reactions step into the activation job (and update the permissions as needed) so that startup time to feedback is faster.

The add-reaction job should not be generated anymore after this change, no legacy support.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 14, 2025 13:48
@github-actions

Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
pelikhan merged commit 062faf3 into main Oct 14, 2025
3 checks passed
@pelikhan
pelikhan deleted the copilot/merge-add-reactions-into-activation branch October 14, 2025 13:50
Copilot AI requested a review from pelikhan October 14, 2025 13:50
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.

2 participants