-
Notifications
You must be signed in to change notification settings - Fork 688
Add githubPullRequests.createInBrowser setting to open PR creation in browser
#8234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tton 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>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
alexr00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot no need to change the current create view. Just add a setting githubPullRequest.createInBrowser, which defaults to false. When set to true, the existing "create" command should open the browser with the appropriate PR URL for the current branch and correct base branch, using the same base branch logic that the "create" view does to pick the starting base branch.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Done in f60aad2. I've changed the approach:
|
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
githubPullRequests.createInBrowser setting to open PR creation in browser
alexr00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot revert the create view related changes, we don't need them anymore.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Done in d72d7ab. Reverted all create view related changes:
The PR now only contains the setting and the logic in reviewManager.ts that checks the setting when the |
Add
githubPullRequests.createInBrowserSettingThis PR adds a setting that changes the behavior of the existing "Create Pull Request" command to open GitHub in the browser instead of showing the create view.
Implementation
Setting (
package.json):githubPullRequests.createInBrowserboolean setting (default: false)pr.createcommand opens GitHub in browser instead of showing the create viewBackend (
src/view/reviewManager.ts):createPullRequest()to check the setting using CREATE_IN_BROWSER constantopenCreatePullRequestInBrowser()method that:{normalizedHost}/{owner}/{repo}/compare/{base}...{head}Constants (
src/common/settingKeys.ts):CREATE_IN_BROWSERconstantChanges
githubPullRequests.createInBrowsersettingpr.createcommand to check setting and open browser when trueOriginal prompt
💡 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.