vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Add "always" option to createOnPublishBranch setting

Open Copilot opened this issue 2 months ago • 0 comments

The githubPullRequests.createOnPublishBranch setting previously supported only "never" and "ask" options. Users requested an "always" option to automatically create PRs on branch publish without prompting.

Changes

  • Configuration (package.json): Added "always" enum value and description reference
  • Localization (package.nls.json): Added description string for the "always" option
  • Implementation (src/extension.ts): Updated git.onDidPublish handler to:
    • Accept 'always' in type definition
    • Auto-create PR when set to "always", skipping the prompt dialog
    • Preserve existing behavior for "ask" and "never"

Behavior

// Setting: "always" → Creates PR automatically on publish
// Setting: "ask"    → Shows dialog (default, unchanged)
// Setting: "never"  → No action (unchanged)

The logic extracts the setting value once, returns early on "never", auto-creates on "always", and falls through to the existing prompt flow for "ask".

Original prompt

This section details on the original issue you should resolve

<issue_title>Add "always" option to "Create On Publish Branch" setting</issue_title> <issue_description>Currently, "Create On Publish Branch" setting only has options "never" or "ask". It would be great to have an "always" option as well.</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes microsoft/vscode-pull-request-github#6123

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Dec 10 '25 11:12 Copilot