From 99ed437c5d91e1fe37fa3fb06e62defd1f0a032c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Feb 2026 08:27:12 +0000 Subject: [PATCH] Document base-branch field for cross-repo PR creation Add documentation for the new base-branch configuration option in the create-pull-request safe output. This field allows workflows to specify which branch a pull request should target, particularly useful for cross-repository workflows targeting non-default branches. Changes: - Add base-branch field to create-pull-request YAML example - Document default behavior (defaults to github.ref_name) - Include use case example for cross-repo PR targeting vnext branch Related: #15089 Co-Authored-By: Claude Sonnet 4.5 --- docs/src/content/docs/reference/safe-outputs.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/content/docs/reference/safe-outputs.md b/docs/src/content/docs/reference/safe-outputs.md index ef9b863881..32b548d582 100644 --- a/docs/src/content/docs/reference/safe-outputs.md +++ b/docs/src/content/docs/reference/safe-outputs.md @@ -637,6 +637,19 @@ safe-outputs: expires: 14 # auto-close after 14 days (same-repo only) if-no-changes: "warn" # "warn" (default), "error", or "ignore" target-repo: "owner/repo" # cross-repository + base-branch: "vnext" # target branch for PR (default: github.ref_name) +``` + +The `base-branch` field specifies which branch the pull request should target. This is particularly useful for cross-repository PRs where you need to target non-default branches (e.g., `vnext`, `release/v1.0`, `staging`). When not specified, defaults to the workflow's branch (`github.ref_name`). + +**Example use case:** A workflow in `org/engineering` that creates PRs in `org/docs` targeting the `vnext` branch for feature documentation: + +```yaml wrap +safe-outputs: + create-pull-request: + target-repo: "org/docs" + base-branch: "vnext" + draft: true ``` > [!NOTE]