Skip to content

Add draft-prs input to PR-creating workflows; default true for shared, false for triggers#328

Merged
strawgate merged 6 commits intomainfrom
copilot/update-trigger-workflows
Feb 21, 2026
Merged

Add draft-prs input to PR-creating workflows; default true for shared, false for triggers#328
strawgate merged 6 commits intomainfrom
copilot/update-trigger-workflows

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

Adds a draft-prs input to PR-creating shared workflows so draft behavior is explicit and typed: downstream consumers default to draft PRs, while this repository's trigger paths explicitly opt out.

What changed

  • Added draft-prs as a boolean workflow input with default: true across PR-creating shared workflows in .github/workflows/gh-aw-*.md (including workflows that previously lacked the input).
  • Normalized existing draft-prs definitions in mention-in-issue and scheduled-fix from string-based values to proper booleans.
  • Updated .github/workflows/gh-aw-fragments/safe-output-create-pr.md to pass the boolean directly:
    • draft: $\{\{ inputs.draft-prs }}
  • Set non-draft behavior for internal automation by configuring:
    • .github/workflows/downstream-users.md (safe-outputs.create-pull-request.draft: false)
  • Added gh-agent-workflows/*/dogfood-with.yml overrides with draft-prs: false for each non-excluded PR-creating workflow so the dogfood script injects the override into the generated trigger-*.yml files. The consumer-facing example.yml files remain clean with no draft-prs override.
  • Removed the unused COPILOT_GITHUB_TOKEN secret declaration from .github/workflows/gh-aw-issue-fixer.md (and regenerated lock output).

All affected .lock.yml and trigger-*.yml files were regenerated via make compile.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Summary by CodeRabbit

  • New Features

    • Added a configurable draft-prs parameter to workflows, enabling control over whether pull requests are created as drafts by default.
  • Chores

    • Updated workflow configurations and metadata across multiple automated workflows to support the new draft PR control option.
    • Removed unused authentication credential from one workflow.

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot AI changed the title [WIP] Update trigger workflows to set draft to false Update PR-creating workflows to use draft: false Feb 21, 2026
Copilot AI requested a review from strawgate February 21, 2026 17:05
@strawgate
Copy link
Collaborator

@copilot we want the PRS for our triggers and internal workflows to not be draft, for downstream users we want their PRs to default to draft so the default for the underlying shared workflows needs to be true but we set the input to false on our triggers

@strawgate strawgate marked this pull request as ready for review February 21, 2026 17:07
…alse

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot we want the PRS for our triggers and internal workflows to not be draft, for downstream users we want their PRs to default to draft so the default for the underlying shared workflows needs to...

Updated in ce4d4c2. The draft-prs input in all shared workflows now defaults to true (so downstream users get draft PRs), while all our trigger example.yml files explicitly set draft-prs: false. The internal downstream-users.md workflow keeps draft: false enforced statically in its safe-outputs.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/ruby/setup-ruby/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/ruby/setup-ruby/git/ref/tags/v1 --jq .object.sha 0.1-go1.25.7.lin-p (http block)
    • Triggering command: /usr/bin/gh gh api /repos/ruby/setup-ruby/git/ref/tags/v1 --jq .object.sha _.a ux-amd64/src/emb-nolocalimports pkg/mod/golang.o-importcfg credential.helpegit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/ruby/setup-ruby/git/ref/tags/v1 --jq .object.sha _.a -I 373992/b192=&gt; --gdwarf-5 373992/b192/ mpile rtcfg s/\(�� tions/.github/workflows X_Wr4T33u rkflows/gh-aw-text-beautifier.lock.yml --gdwarf-5 --64 373992/b234/ ctor (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Update PR-creating workflows to use draft: false Add draft-prs input to PR-creating workflows; default true for shared, false for triggers Feb 21, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request introduces a new draft-prs boolean input parameter across multiple GitHub Actions workflows, allowing control over whether pull requests are created as drafts. The changes include adding the input to workflow definitions, updating safe-output configuration, passing draft-prs: false to workflow invocations, and creating dogfood configuration files with the flag set to false.

Changes

Cohort / File(s) Summary
Workflow Definitions - Draft PRS Input Addition
.github/workflows/gh-aw-{bug-exterminator,code-duplication-fixer,code-simplifier,newbie-contributor-fixer,release-update,small-problem-fixer,test-improver,text-beautifier}*.{lock.yml,md}
Added new draft-prs boolean input (default: true) to workflow_call.inputs. Updated frontmatter metadata hashes in .lock.yml files. Consistent across all workflow variants.
Workflow Definitions - Type Conversion & Description Updates
.github/workflows/gh-aw-{mention-in-issue,scheduled-fix}*.{lock.yml,md}
Converted draft-prs input from string to boolean type, updated descriptions to "Whether to create pull requests as drafts", and changed defaults from string "true" to boolean true.
Issue Fixer Workflow
.github/workflows/gh-aw-issue-fixer*.{lock.yml,md}
Added draft-prs boolean input and removed COPILOT_GITHUB_TOKEN secret from workflow_call.secrets. Updated frontmatter metadata.
Safe Output Fragment
.github/workflows/gh-aw-fragments/safe-output-create-pr.md
Changed draft field assignment from ${{ inputs.draft-prs != 'false' }} to ${{ inputs.draft-prs }} for direct boolean usage.
Downstream Users Configuration
.github/workflows/downstream-users*.{lock.yml,md}
Extended safe-outputs handler config by adding "draft": false to create_pull_request configuration. Updated metadata hash.
Workflow Trigger Files - Draft PRS False
.github/workflows/trigger-{bug-exterminator,code-duplication-fixer,code-simplifier,mention-in-issue,newbie-contributor-fixer,release-update,small-problem-fixer,test-improver,text-beautifier}.yml
Added with: draft-prs: false parameter block to reusable workflow invocations, explicitly disabling draft PR creation.
Dogfood Configuration Files
gh-agent-workflows/*/dogfood-with.yml
Created or updated dogfood configuration files across all agent workflows (bug-exterminator, code-duplication-fixer, code-simplifier, mention-in-issue, newbie-contributor-fixer, release-update, small-problem-fixer, test-improver, text-beautifier) with draft-prs: false setting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • github-actions

Poem

🐰 A draft no more, our PRs shall flow free,
With draft-prs: false, the flag sets them to be!
Through workflows and fragments, the change spreads with care,
Boolean inputs sprouting everywhere!
Dogfood configs aligned, the story complete,
A hop and a skip—our refactor's so neat! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and accurately describes the main change: adding a draft-prs input to workflows with different defaults for shared workflows (true) versus trigger workflows (false).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/update-trigger-workflows

Comment @coderabbitai help to get the list of available commands and usage tips.

@strawgate
Copy link
Collaborator

@copilot this needs to go in the dogfood scripts or as an override, you can't just put it directly in the trigger files

…ple.yml files

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot this needs to go in the dogfood scripts or as an override, you can't just put it directly in the trigger files

Fixed in 40dd4c4. Removed draft-prs: false from all example.yml files and instead created dogfood-with.yml for each non-excluded PR-creating workflow. The dogfood script now injects draft-prs: false into the generated trigger-*.yml files, while the consumer-facing example.yml files remain clean.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/ruby/setup-ruby/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/ruby/setup-ruby/git/ref/tags/v1 --jq .object.sha 0.1-go1.25.7.lin. @v0.3.0/latte.go--gdwarf2 rg/toolchain@v0.--64 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/ruby/setup-ruby/git/ref/tags/v1 --jq .object.sha .org/toolchain@v-D rg/toolchain@v0.GOAMD64_v1 u/13/cc1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@strawgate strawgate merged commit 5a3d45d into main Feb 21, 2026
6 of 7 checks passed
@strawgate strawgate deleted the copilot/update-trigger-workflows branch February 21, 2026 17:41
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