Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

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)


✨ 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 AI self-assigned this Dec 10, 2025
Copilot AI changed the title [WIP] Add always option to create on publish branch setting Add "always" option to createOnPublishBranch setting Dec 10, 2025
Copilot AI requested a review from alexr00 December 10, 2025 11:28
@alexr00 alexr00 marked this pull request as ready for review December 17, 2025 14:59
@alexr00 alexr00 enabled auto-merge (squash) December 17, 2025 14:59
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 17, 2025
@hediet
Copy link
Member

hediet commented Dec 17, 2025

@alexr00 something is weird with the diff in extension.ts! Can you double check?

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why the diff on github.com is showing so much changed. The diff is actually pretty small. This is ok to approve. I recommened reviewing with insiders.vscode.dev.

@alexr00 alexr00 merged commit 5420a33 into main Dec 17, 2025
6 checks passed
@alexr00 alexr00 deleted the copilot/add-always-option-create-branch branch December 17, 2025 16:59
@hediet
Copy link
Member

hediet commented Dec 18, 2025

I don't know why the diff on github.com is showing so much changed. The diff is actually pretty small. This is ok to approve. I recommened reviewing with insiders.vscode.dev.

I believe the line endings changed!
You can also see it in the patch here: https://github.com/microsoft/vscode-pull-request-github/pull/8259.patch

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.

Add "always" option to "Create On Publish Branch" setting

4 participants