Skip to content

Remove legacy generateFooter#15566

Merged
pelikhan merged 2 commits intogithub:mainfrom
strawgate:std-footer-gen
Feb 14, 2026
Merged

Remove legacy generateFooter#15566
pelikhan merged 2 commits intogithub:mainfrom
strawgate:std-footer-gen

Conversation

@strawgate
Copy link
Contributor

@strawgate strawgate commented Feb 14, 2026

Fixes #15564 and ensures that the footer can be customized no matter where it's used

Replace the legacy `generateFooter` (from `generate_footer.cjs`) with
`generateFooterWithMessages` (from `messages_footer.cjs`) across all
remaining callers. This enables `messages.footer` custom templates to
apply everywhere, including PR reviews, issue closing, and PR ready
notifications.

- Migrate 5 callers: pr_review_buffer, close_pull_request,
  close_entity_helpers, create_issue, mark_pull_request_as_ready_for_review
- Remove now-unused `generateFooter` function and its test suite
  from generate_footer.cjs (-217 lines net)
- Clean up test setup: remove file-based GH_AW_PROMPTS_DIR scaffolding
  that was only needed by the old footer generator

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings February 14, 2026 01:49
Copy link
Contributor

Copilot AI left a comment

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 standardizes footer generation across the codebase by migrating from the legacy generateFooter function to generateFooterWithMessages, which uses the messages.footer configuration instead of hardcoded footer files.

Changes:

  • Replaced all imports and calls to generateFooter from generate_footer.cjs with generateFooterWithMessages from messages_footer.cjs
  • Removed the legacy generateFooter function implementation and its associated file-reading logic from generate_footer.cjs
  • Updated test files to remove test setup for the legacy prompts directory and file-based footer templates

Reviewed changes

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

Show a summary per file
File Description
actions/setup/js/pr_review_buffer.cjs Updated import to use generateFooterWithMessages instead of legacy generateFooter
actions/setup/js/mark_pull_request_as_ready_for_review.cjs Updated import and function call to use generateFooterWithMessages
actions/setup/js/create_issue.cjs Updated import to use generateFooterWithMessages and split imports to keep generateWorkflowIdMarker from generate_footer.cjs
actions/setup/js/close_pull_request.cjs Updated import to use generateFooterWithMessages
actions/setup/js/close_entity_helpers.cjs Updated import to use generateFooterWithMessages
actions/setup/js/generate_footer.cjs Removed legacy generateFooter function, file system dependencies, and related helper imports
actions/setup/js/generate_footer.test.cjs Removed all tests for the legacy generateFooter function and associated test setup for prompts directory
actions/setup/js/pr_review_buffer.test.cjs Updated test setup to use GH_AW_SAFE_OUTPUT_MESSAGES environment variable instead of creating temporary prompts directory files

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

@pelikhan
Copy link
Contributor

  • show a diff of the rendering of the footer
  • compare features in deprecated and new version. make sure all features (like domains) are present

@strawgate
Copy link
Contributor Author

strawgate commented Feb 14, 2026

1. Rendered footer diff

Old (generateFooter) — no custom messages configured:

> AI generated by [my-workflow](https://github.com/owner/repo/actions/runs/123) for #42
>
> To add this workflow in your repository, run `gh aw add owner/repo/workflow.md@main`. See [usage guide](https://github.github.com/gh-aw/guides/packaging-imports/).

⚠️ Firewall blocked domains: example.com (if applicable)

<!-- gh-aw-agentic-workflow: my-workflow, run: https://github.com/owner/repo/actions/runs/123 -->

New (generateFooterWithMessages) — no custom messages configured:

> Generated by [my-workflow](https://github.com/owner/repo/actions/runs/123) for issue #42
>
> To install this workflow, run `gh aw add owner/repo/workflow.md@main`. View source at [https://github.com/owner/repo/blob/main/workflow.md](https://github.com/owner/repo/blob/main/workflow.md).

⚠️ Firewall blocked domains: example.com (if applicable)

<!-- gh-aw-agentic-workflow: my-workflow, run: https://github.com/owner/repo/actions/runs/123 -->

Text differences in defaults:

Element Old New
Attribution prefix > AI generated by > Generated by
Triggering ref for #42 for issue #42
Install verb "To add this workflow" "To install this workflow"
Install link "See usage guide" "View source at [url]"

Note: add_comment.cjs and check_workflow_recompile_needed.cjs were already using generateFooterWithMessages before this PR, so the codebase was already producing mixed footer text. This PR makes it consistent.

2. Feature comparison

Feature Old (generateFooter) New (generateFooterWithMessages) Status
Footer attribution Hardcoded > AI generated by Configurable via messages.footer (default: > Generated by) ✅ Present + customizable
Triggering reference (issue/PR/discussion) for #N / for discussion #N for issue #N / for issue #discussion #N ✅ Present
Install instructions Read from $GH_AW_PROMPTS_DIR/workflow_install_note.md Configurable via messages.footerInstall (has default) ✅ Present + customizable
Missing tools/data sections (getMissingInfoSections) ✅ Same code path
Blocked domains section (getBlockedDomains + generateBlockedDomainsSection) ✅ Same code path
XML marker (generateXMLMarker) ✅ Same code path
Custom messages.footer template support ❌ Not supported ✅ Supported 🆕 Added
Custom messages.footerInstall template support ❌ Not supported ✅ Supported 🆕 Added

All features from the old version are present. The new version adds customizability via messages.footer and messages.footerInstall templates — which was the motivation for this migration.

@pelikhan
Copy link
Contributor

Looks good. Some test fixes needed.

@strawgate
Copy link
Contributor Author

looks like the same tests are failing on main #15568

@pelikhan pelikhan merged commit f4b0691 into github:main Feb 14, 2026
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.

Standardize footer customization to using messages.footer

3 participants