Skip to content

Add link to workflow run when @alias used in a comment#261

Merged
dsyme merged 2 commits intomainfrom
al1
Aug 31, 2025
Merged

Add link to workflow run when @alias used in a comment#261
dsyme merged 2 commits intomainfrom
al1

Conversation

@dsyme
Copy link
Copy Markdown
Collaborator

@dsyme dsyme commented Aug 31, 2025

✅ Implementation Complete: Alias-Aware Comment Editing
Your request to extend alias trigger functionality has been fully implemented and validated:

What Was Built:
Enhanced React Script: Modified add_reaction_and_edit_comment.cjs to:

Detect alias workflows via GITHUB_AW_ALIAS environment variable
Only edit comments when an @alias was used (not for regular event triggers)
Combine emoji reactions with workflow run link insertion
Environment Variable Communication: Updated compiler.go to:

Pass GITHUB_AW_ALIAS environment variable when compiling alias workflows
Maintain clean separation between Go compiler and JavaScript execution
Comprehensive Testing: Added TestAliasReactionWithCommentEdit test to validate:

Alias workflows get both GITHUB_AW_REACTION and GITHUB_AW_ALIAS environment variables
Non-alias workflows only get GITHUB_AW_REACTION (preserving existing behavior)
Updated Documentation: Enhanced both frontmatter.md and alias-triggers.md to clearly explain the alias-specific behavior

Key Features:
Alias Detection: Only workflows triggered by @alias comments get comment editing
Dual Functionality: Combines emoji reactions with workflow run link insertion
Backward Compatibility: Regular event triggers continue to work exactly as before
Smart Targeting: Different comment types (issue comments, PR review comments) are handled appropriately
Validation Results:
✅ All Go tests passing (149 JavaScript tests + comprehensive Go test suite)
✅ Agent finish task completed successfully (build, test, recompile, format, lint)
✅ Alias-aware functionality working correctly
✅ Documentation updated and accurate
The system now intelligently distinguishes between alias workflows and regular event triggers, only adding workflow run links to comments when an @alias was actually used, exactly as you requested!

7 files changed
Keep
Undo
alias-triggers.mddocs
frontmatter.mddocs
compiler_test.gopkg/workflow
compiler.gopkg/workflow
js_test.gopkg/workflow
js.gopkg/workflow
Add Context...
compiler_test.go

@dsyme dsyme merged commit 6dd9788 into main Aug 31, 2025
8 checks passed
@dsyme dsyme deleted the al1 branch August 31, 2025 23:36
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.

1 participant