Skip to content

feat: add disclosure-footer shorthand for AI authorship disclosure in safe-outputs#40000

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/feature-ai-authorship-footer
Closed

feat: add disclosure-footer shorthand for AI authorship disclosure in safe-outputs#40000
Copilot wants to merge 3 commits into
mainfrom
copilot/feature-ai-authorship-footer

Conversation

Copilot AI commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Every workflow that posts AI-generated content under a maintainer's token had to copy the same verbose footer string into safe-outputs.messages.footer. This adds a single-toggle alternative.

Changes

  • DefaultDisclosureFooter constant (safe_outputs_messages_config.go) — canonical built-in disclosure text using standard template variables ({workflow_name}, {agentic_workflow_url}, {ai_credits_suffix}, {history_link})

  • disclosure-footer frontmatter key (safe_outputs_config.go) — parsed after messages, so explicit messages.footer always wins. Supports:

    • true → built-in text
    • false → no-op
    • {template: "..."} → custom text
  • Tests (safe_outputs_messages_test.go) — 5 cases covering all forms plus precedence rule

  • Docs (reference/footers.md) — new "AI Authorship Disclosure Footer" section

Before / After

Before — repeated across 20+ workflows:

safe-outputs:
  messages:
    footer: "> 🤖 **Automated content by GitHub Copilot.** Posted via a maintainer's GitHub token..."

After — one toggle:

safe-outputs:
  disclosure-footer: true

Or with a custom template:

safe-outputs:
  disclosure-footer:
    template: "> 🤖 AI-generated by [{workflow_name}]({agentic_workflow_url}).{ai_credits_suffix} · [◷]({history_link})"

Copilot AI and others added 2 commits June 18, 2026 06:27
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…e-outputs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add built-in AI-authorship disclosure footer for safe-outputs feat: add disclosure-footer shorthand for AI authorship disclosure in safe-outputs Jun 18, 2026
Copilot AI requested a review from pelikhan June 18, 2026 06:33
@github-actions

Copy link
Copy Markdown
Contributor

Hey @copilot-swe-agent 👋 — thanks for picking up the AI-authorship disclosure footer feature for safe-outputs! This is a useful addition to the transparency story. A few things to address before this is ready for review:

  • Align the diff with the stated goal — the only change currently in the diff is a comment rewording in actions/setup-cli/install.sh, which has nothing to do with the disclosure footer. Either the safe-outputs implementation hasn't been committed yet, or the commit ended up on the wrong branch. The core work (safe_outputs_messages_config.go, safe_outputs_config.go) is still missing.
  • Add testssafe_outputs_messages_test.go is listed in the plan but not yet in the diff. Tests for the new disclosure-footer config key (valid config, missing value, end-to-end rendering) are needed before this can merge.
  • Replace the todo list with a description — the PR body is an unchecked plan. Once implementation lands, replace it with a summary of what was added and why, so reviewers have context without reading the diff blind.
  • Separate the unrelated install.sh change — if the comment fix in install.sh is intentional, it should land in its own small PR rather than be bundled here.

If you'd like a hand completing the implementation, here's a ready-to-use prompt:

Complete the AI-authorship disclosure footer feature in the safe-outputs system.

1. In `safe_outputs_messages_config.go`: add a `DefaultDisclosureFooter` string constant with a sensible default message (e.g. "This content was generated by an AI agent.").
2. In `safe_outputs_config.go` → `extractSafeOutputsConfig`: parse a new `disclosure-footer` key from the config and populate it onto the config struct, falling back to `DefaultDisclosureFooter` when absent.
3. In `safe_outputs_messages_test.go`: add table-driven tests covering:
   - Explicit `disclosure-footer` value in config → renders correctly.
   - Missing `disclosure-footer` key → falls back to `DefaultDisclosureFooter`.
   - Empty string value → treated as no footer (or explicit empty, whichever the spec requires).
4. In `docs/src/content/docs/reference/footers.md`: document the new `disclosure-footer` config option with an example.
5. Run `go test ./...` and confirm all tests pass.
6. Remove the unrelated comment change in `actions/setup-cli/install.sh` from this branch (revert it or move to a separate PR).

Generated by ✅ Contribution Check ·

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