Skip to content

[refactoring] Extract shared PR safe-output defaults (steer, expires, draft) #77041

Done

Description

@github-actions

Summary

About 48 workflow files set steer: true, about 49 set expires: 2d, and about 46 set draft: false on pull-request safe outputs. shared/q-safe-outputs.md already holds this pattern for one workflow, but the same keys are repeated across the rest.

Current usage

  • steer: true: 48 files
  • expires: 2d: about 49 files
  • draft: false: about 46 files
  • reviewers: copilot: about 6 files
  • shared/q-safe-outputs.md is imported by q.md (L26-27), with a local safe-outputs block at L41

Proposed shared component

.github/workflows/shared/pr-safe-output-defaults.md with only the common keys (steer, expires, draft). Keep title-prefix, labels, and reviewers local, since they vary by workflow. Extending shared/q-safe-outputs.md instead would couple q-specific behavior to every importer, so a separate file is the safer choice.

Estimated impact

  • About 46 workflows, 3-4 lines each: about 140-180 lines removed
  • A default such as expires becomes a one-file change

Risk to validate first

Merge semantics for scalar safe-outputs keys are not confirmed. pkg/parser/import_extract_engine.go appends slice fields (appendJSONSliceField), but the code path for a local scalar overriding an imported scalar has not been checked. Confirm this with a canary before migrating.

Migration plan

  1. Confirm scalar override behavior with a canary, compiled only.
  2. Create the shared component with the common keys.
  3. Migrate workflows in batches, keeping local overrides in place.
  4. Run make recompile per batch and confirm the diff is limited to the safe-outputs block.
  5. Skip upstream-managed workflows with a source: field.

Example usage

imports:
  - uses: shared/pr-safe-output-defaults.md
safe-outputs:
  create-pull-request:
    title-prefix: "[docs] "

Generated by 🔍 Workflow Skill Extractor · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~1 AIC · ⊞ 3K · ◷

  • expires on Nov 13, 2026, 7:49 PM UTC-08:00

Activity

  1. github-actions commented on Nov 12, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt50 · ~1 AIC · ⌖ ~2 AIC · ⊞ 10.5K · ◷

  2. linked a pull request that will close this issueExtract shared PR safe-output defaults #77050on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions