项目作者: jasonnutter
项目描述 :
VS Code plugin for working with Github PRs.
高级语言: JavaScript
项目地址: git://github.com/jasonnutter/vscode-github-pr.git
VS Code - Github PR

VS Code extension for working with Github Pull Requests, supporting both Github.com and Github Enterprise servers.
Features
- Supports both Github.com and Github Enterprise servers.
- Configurable default remote (e.g.
origin
) and branch (e.g. master
).
Create PR
Create an PR from VS Code by providing a branch name and commit message.
Workflow
- Open the command palette and select Github PR: Create PR.
- First, input the name of the branch you want created for this PR. If you are not on your default branch, the current branch name will be autofilled (providing a different branch name will result in a new branch).
- Next, provide the commit message for the changes. If the branch is clean, the last commit message will be autofilled (providing a different commit message will only impact the PR).
- If the new branch is different from your current branch, the new branch will be created and checked out.
- If the current branch has uncommitted changes, all changed files will be committed with the provided commit message.
- The branch will be pushed to the remote specified as
github-pr.targetRemote
(defaults to origin
). - An PR will be created to the branch specified as
github-pr.targetBranch
(defaults to master
) from the new branch. - A message will be shown in VS Code with a link to the PR.
Checkout PR
Checkout out an existing PR from the current repo.
Workflow
- Open the command palette and select Github PR: Checkout PR.
- Select an PR from the list.
- If the branch for the selected PR does not exist on your computer, it will be created and switched to.
- If the branch for the selected PR does exist on your computer, it will be switched to.
View PR
View an existing PR in your browser.
Workflow
- Open the command palette and select Github PR: View PR.
- Select an PR from the list.
- The PR will be opened in your browser.
Extension Settings
github-pr.accessToken
: Access token to use to connect to the Github.com API. Create one by going to Profile Settings -> Access Tokens.github-pr.accessTokens
: Access token to use to connect to Github CE/EE APIs. Create one by going to Profile Settings -> Access Tokens.github-pr.targetBranch
: Default target branch for PRs (defaults to master
).github-pr.targetRemote
: Default target remote for PRs (defaults to origin
).github-pr.autoOpenPr
: Automatically open a new PR in your browser.
Access Tokens Example
"github-pr.accessToken": "ACCESS_TOKEN_FOR_GITHUB.COM",
"github-pr.accessTokens": {
"https://github.domain.com": "ACCESS_TOKEN_FOR_GITHUB.DOMAIN.COM"
}
Links