Skip to content

[q] Use generateFooterWithMessages in add_comment to respect custom footer config#15964

Merged
pelikhan merged 1 commit intomainfrom
q/fix-add-comment-footer-27328257f7b7479d
Feb 15, 2026
Merged

[q] Use generateFooterWithMessages in add_comment to respect custom footer config#15964
pelikhan merged 1 commit intomainfrom
q/fix-add-comment-footer-27328257f7b7479d

Conversation

@github-actions
Copy link
Contributor

Problem

The add_comment.cjs safe output handler was using a hardcoded footer instead of the generateFooterWithMessages function. This prevented custom footer configurations specified in workflow frontmatter from being applied to comments.

Investigation (from live data)

Workflow Run Analysis: #22037921224

Expected Footer (from workflow config):

messages:
  footer: "> 🧪 *Temporary ID smoke test by [{workflow_name}]({run_url})*"
````

**Actual Footer** (from live comment):
````
> AI generated by [Smoke Temporary ID](https://github.com/github/gh-aw/actions/runs/22037921224)

Changes Made

actions/setup/js/add_comment.cjs

  • Before: Used hardcoded footer > AI generated by [workflow](url)
  • After: Uses generateFooterWithMessages() to respect custom footer configuration
  • Added workflow source and triggering context parameters
  • Removed duplicate getMissingInfoSections() call (already included in generateFooterWithMessages)

actions/setup/js/add_comment.test.cjs

  • Updated test assertions from "AI generated by" to "Generated by"
  • Tests now reflect the default footer template used by generateFooterWithMessages

Expected Improvements

  • ✅ Custom footer messages will now appear in comments
  • ✅ Consistency between create_issue and add_comment footer behavior
  • ✅ Missing tools/data sections still included via generateFooterWithMessages
  • ✅ XML markers still added for traceability

Validation

All JavaScript files formatted successfully with make fmt-cjs.

References

AI generated by Q

  • expires on Feb 17, 2026, 5:39 PM UTC

…footer config

The add_comment.cjs file was using a hardcoded footer instead of the
generateFooterWithMessages function, which prevented custom footer
configurations from being applied.

This change:
- Replaces hardcoded footer with generateFooterWithMessages call
- Adds workflow source and triggering context to footer generation
- Updates test expectations to match new footer format

Fixes the issue where workflows with custom footer messages in the
messages.footer configuration were not being applied to comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan merged commit 1c4b3c7 into main Feb 15, 2026
@pelikhan pelikhan deleted the q/fix-add-comment-footer-27328257f7b7479d branch February 15, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[smoke-temporary-id] Sub-Issue 2: Test Different ID Length

1 participant