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 and others added 3 commits December 10, 2025 11:16
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
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
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

2 participants