Skip to content

Add additive global footers to safe-output bodies - #60275

Merged
pelikhan merged 6 commits into
mainfrom
copilot/add-safe-outputs-body-footer
Sep 11, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/add-safe-outputs-body-footer

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Adds safe-outputs.body-footer for appending shared content to every safe output that produces a body. Footers compose across imported workflows and handler-specific configuration while remaining independent of generated attribution footers.

Changes

  • Configuration

    • Adds top-level body-footer schema, parsing, and documentation.
    • Supports {workflow_name} and {run_url} placeholders.
  • Composition

    • Preserves the main workflow footer followed by imported footers in import order.
    • Appends handler-specific footers before global footers.
    • Separates configured footers with blank lines.
  • Coverage

    • Applies footers across GitHub issues, pull requests, discussions, comments, reviews, releases, and comment memory.
    • Covers body-producing Linear, Jira, Azure DevOps, project-status, and agent-session outputs.
    • Keeps configured footers active when generated attribution footers are disabled.
safe-outputs:
  footer: false
  body-footer: |
    Generated for [{workflow_name}]({run_url})
  create-issue:
    body-footer: |
      Issue-specific context

Copilot AI and others added 3 commits September 11, 2026 13:22
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add additive safe-output body footers Add additive global footers to safe-output bodies Sep 11, 2026
Copilot AI requested a review from pelikhan September 11, 2026 13:39
@pelikhan
pelikhan marked this pull request as ready for review September 11, 2026 13:40
Copilot AI balanced review requested due to automatic review settings September 11, 2026 13:40

Copilot AI 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.

🟡 Changes recommended

The deleted action lock breaks an existing test, while some handlers omit footers or can exceed provider body limits.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds additive global body footers across safe-output handlers, independently of attribution footers.

Changes:

  • Adds schema, parsing, import composition, and documentation.
  • Propagates and renders footers across GitHub and external-service handlers.
  • Adds coverage for composition and rendering behavior.
File summaries
File Description
pkg/workflow/safe_outputs_footer_test.go Tests global and imported footer composition.
pkg/workflow/safe_outputs_config_types.go Defines global footer configuration.
pkg/workflow/safe_outputs_config_runtime.go Injects global footers into handlers.
pkg/workflow/safe_outputs_config_global.go Parses the global setting.
pkg/workflow/safe_outputs_config_generation.go Passes footers to comment memory.
pkg/workflow/imports.go Composes imported footers.
pkg/workflow/compiler_yaml_runtime_setup.go Configures early comment-memory setup.
pkg/workflow/comment_memory.go Combines comment-memory footers.
pkg/workflow/.github/aw/imports/githubnext/agentics/d3422bf940923ef1d43db5559652b8e1e71869f3/workflows_shared_reporting.md Removes cached imported documentation.
pkg/workflow/.github/aw/imports/.gitattributes Removes cached-import attributes.
pkg/workflow/.github/aw/actions-lock.json Removes the package-local action lock.
pkg/parser/schemas/main_workflow_schema.json Adds global footer schema.
pkg/parser/schema_test.go Tests schema acceptance and metadata filtering.
pkg/parser/schema_compiler.go Marks footer fields as metadata.
docs/src/content/docs/reference/footers.md Documents global footer behavior.
actions/setup/js/update_release.cjs Applies footers to release updates.
actions/setup/js/update_pull_request.cjs Passes footer data through PR updates.
actions/setup/js/update_pr_description_helpers.test.cjs Tests updated-body footer rendering.
actions/setup/js/update_pr_description_helpers.cjs Appends footers to updated bodies.
actions/setup/js/update_issue.cjs Passes footer data through issue updates.
actions/setup/js/update_entity_helpers.cjs Carries footer configuration in update data.
actions/setup/js/update_discussion.cjs Appends footers to discussion updates.
actions/setup/js/types/safe-outputs-config.d.ts Types the new configuration field.
actions/setup/js/submit_pr_review.cjs Configures review footer context.
actions/setup/js/reply_to_pr_review_comment.test.cjs Tests review-reply footers.
actions/setup/js/reply_to_pr_review_comment.cjs Appends footers to review replies.
actions/setup/js/pr_review_buffer.test.cjs Tests buffered review footers.
actions/setup/js/pr_review_buffer.cjs Appends footers to review bodies.
actions/setup/js/linear_update_issue.cjs Applies footers to Linear updates.
actions/setup/js/linear_create_issue.cjs Applies footers to Linear issues.
actions/setup/js/linear_add_comment.cjs Applies footers to Linear comments.
actions/setup/js/jira_handlers.test.cjs Tests Jira footer behavior.
actions/setup/js/jira_handlers.cjs Applies validated footers to Jira bodies.
actions/setup/js/create_project_status_update.cjs Applies footers to project statuses.
actions/setup/js/create_pr_review_comment.cjs Applies footers to review comments.
actions/setup/js/create_discussion.cjs Applies footers to discussions.
actions/setup/js/create_agent_session.cjs Applies footers to agent prompts.
actions/setup/js/comment_memory.test.cjs Tests comment-memory footers.
actions/setup/js/comment_memory.cjs Renders comment-memory footers.
actions/setup/js/close_pull_request.cjs Passes footers to closing comments.
actions/setup/js/close_issue.cjs Passes footers to closing comments.
actions/setup/js/close_entity_helpers.cjs Appends footers to closing comments.
actions/setup/js/close_discussion.cjs Appends footers to discussion closures.
actions/setup/js/body_footer.test.cjs Tests the shared footer helper.
actions/setup/js/body_footer.cjs Adds shared footer rendering logic.
actions/setup/js/azure_devops_work_items.test.cjs Tests Azure DevOps footer behavior.
actions/setup/js/azure_devops_work_items.cjs Applies footers to Azure DevOps bodies.
actions/setup/js/add_comment.cjs Appends footers to comments.
.changeset/patch-add-safe-output-body-footer.md Updates the release note.
Review details

Suppressed comments (1)

pkg/workflow/.github/aw/actions-lock.json:1

  • Deleting this file makes TestActionsLockJSONFieldsAreSorted fail unconditionally: pkg/workflow/action_lock_sorted_test.go:28-39 still reads .github/aw/actions-lock.json from the package working directory. Restore the tracked lock file (or update the test and fixture strategy in the same PR).
  • Files reviewed: 48/49 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread actions/setup/js/body_footer.cjs Outdated
Comment thread actions/setup/js/create_agent_session.cjs
Comment thread pkg/workflow/safe_outputs_config_runtime.go
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main, recompile and fix https://github.com/github/gh-aw/actions/runs/34610222487/job/103299221118?pr=60275

Done in fb9e0ed.

  • main (3aba3a1) is merged into the branch (merge commit a553a38); no conflicts.
  • Recompiled all 299 workflows — no .lock.yml drift.
  • Fixed the failing job: impacted-js-tests / js-typecheck was failing on memory_custom_validation.cjs(53,40) TS2769 — fs.readFileSync(targetPath, encoding) with encoding typed as BufferEncoding | undefined matches no overload. readFile now calls the single-argument overload when encoding is undefined. npm run typecheck is clean.

Local validation: make fmt, make lint, make test-unit, make recompile, and the memory/push-repo-memory JS tests all pass.

@pelikhan
pelikhan merged commit d18f002 into main Sep 11, 2026
11 of 12 checks passed
@pelikhan
pelikhan deleted the copilot/add-safe-outputs-body-footer branch September 11, 2026 14:49
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.89.5

github-actions Bot added a commit that referenced this pull request Sep 13, 2026
… changes

Fixes three accuracy gaps found since the last instructions sync (v0.88.7, PR #60231):
- target: enforcement (#60362) was undocumented: when target is "triggering" or a fixed
  number, model-supplied issue/PR numbers are ignored, not merely validated.
- The new global body-footer: field (#60275, additive with per-handler body-footer) was
  missing from safe-outputs-runtime.md.
- gh aw update now accepts a package URL/name to update all workflows from that package
  (#60452); cli-commands.md only showed single-workflow and bulk update forms.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

3 participants