Unified
Split
Showing
with
4,458 additions
and 3,797 deletions.
- BIN .readme/demo.gif
- +41 −0 CHANGELOG.md
- +3 −2 README.md
- +77 −14 package.json
- +22 −0 preview-src/app.tsx
- +5 −6 preview-src/cache.ts
- +195 −0 preview-src/comment.tsx
- +174 −0 preview-src/context.tsx
- +54 −0 preview-src/diff.tsx
- +107 −0 preview-src/header.tsx
- +16 −0 preview-src/icon.tsx
- +107 −18 preview-src/index.css
- +2 −336 preview-src/index.ts
- +11 −0 preview-src/markdown.tsx
- +189 −0 preview-src/merge.tsx
- +1 −0 preview-src/message.ts
- +26 −0 preview-src/overview.tsx
- +0 −1,259 preview-src/pullRequestOverviewRenderer.ts
- +67 −0 preview-src/sidebar.tsx
- +14 −0 preview-src/space.tsx
- +145 −0 preview-src/timeline.tsx
- +13 −0 preview-src/timestamp.tsx
- +1 −1 preview-src/tsconfig.json
- +13 −0 preview-src/user.tsx
- +6 −0 resources/icons/dark/github.svg
- 0 resources/icons/{ → light}/github.svg
- +224 −0 src/api/api.d.ts
- +82 −0 src/api/api1.ts
- +3 −3 src/authentication/githubServer.ts
- +1 −7 src/authentication/keychain.ts
- +49 −2 src/commands.ts
- +1 −1 src/common/diffHunk.ts
- +1 −1 src/common/remote.ts
- +2 −0 src/common/resources.ts
- +5 −2 src/common/timelineEvent.ts
- +1 −2 src/common/uri.ts
- +318 −0 src/common/utils.ts
- +20 −9 src/extension.ts
- +0 −119 src/git/api.ts
- +0 −66 src/git/model.ts
- +20 −0 src/gitProviders/api.ts
- +34 −0 src/gitProviders/builtinGit.ts
- +88 −0 src/gitProviders/vsls.ts
- +31 −8 src/{git → gitProviders}/vslsguest.ts
- +12 −6 src/{git → gitProviders}/vslshost.ts
- +90 −0 src/github/commands.ts
- +10 −6 src/github/credentials.ts
- +76 −19 src/github/githubRepository.ts
- +1 −1 src/github/interface.ts
- +1 −1 src/github/pullRequestGitHelper.ts
- +92 −27 src/github/pullRequestManager.ts
- +30 −12 src/github/pullRequestModel.ts
- +9 −14 src/github/pullRequestOverview.ts
- +92 −11 src/github/utils.ts
- +3 −3 src/test/github/pullRequestModel.test.ts
- +363 −105 src/typings/vscode.proposed.d.ts
- +1 −1 src/view/gitContentProvider.ts
- +92 −192 src/view/prDocumentCommentProvider.ts
- +33 −6 src/view/prsTreeDataProvider.ts
- +728 −482 src/view/reviewDocumentCommentProvider.ts
- +31 −26 src/view/reviewManager.ts
- +26 −1 src/view/treeNodes/categoryNode.ts
- +11 −9 src/view/treeNodes/fileChangeNode.ts
- +472 −363 src/view/treeNodes/pullRequestNode.ts
- +116 −656 yarn.lock
Binary file not shown.
| @@ -1,3 +1,44 @@ | |||
| 0.6.1 | |||
|
|
|||
| **Bug fixes** | |||
| - Fix git onDidOpenRepository eventing [#1122](https://github.com/Microsoft/vscode-pull-request-github/pull/1122) | |||
|
|
|||
| 0.6.0 | |||
|
|
|||
| **Changes** | |||
| - Introduce new comment provider API [#972](https://github.com/Microsoft/vscode-pull-request-github/pull/972) | |||
| - Fix rendering of checkboxes on description page [#1038](https://github.com/Microsoft/vscode-pull-request-github/issues/1038) | |||
| - Fix [#1082](https://github.com/Microsoft/vscode-pull-request-github/issues/1082) to make sure commands are scoped to the correct tree | |||
| - Fix [#291](https://github.com/Microsoft/vscode-pull-request-github/issues/291) to use monospace font for code blocks on description page | |||
|
|
|||
|
|
|||
| 0.5.1 | |||
|
|
|||
| **Changes** | |||
| - Fix description not displaying after creating a pull request [#1041](https://github.com/Microsoft/vscode-pull-request-github/pull/1041) | |||
|
|
|||
| 0.5.0 | |||
|
|
|||
| **Breaking Changes** | |||
|
|
|||
| - From 0.5.0, you at least need VSCode 1.32 to install and run the extension. | |||
|
|
|||
| **Changes** | |||
| - Add support for reacting to comments [#46](https://github.com/Microsoft/vscode-pull-request-github/issues/46) | |||
| - Display reviewers on the description page, and support adding and removing them [#412](https://github.com/Microsoft/vscode-pull-request-github/issues/412) | |||
| - Support adding and removing labels from the description page [#933](https://github.com/Microsoft/vscode-pull-request-github/issues/933) | |||
| - Fix [#936](https://github.com/Microsoft/vscode-pull-request-github/issues/936), pending review not correctly detected in "Changes in Pull Request" tree | |||
| - Fix [#929](https://github.com/Microsoft/vscode-pull-request-github/issues/929), description textarea not cleared when approving or requesting changes | |||
| - Fix [#912](https://github.com/Microsoft/vscode-pull-request-github/issues/912), approving the PR scrolls to the top of the page | |||
|
|
|||
| **New settings** | |||
| - `githubPullRequests.showInSCM` can be used to configure where the `GitHub Pull Requests` tree is shown, either the new GitHub viewlet or | |||
| the SCM viewlet where it was before. By default, the tree is shown in the GitHub viewlet. | |||
|
|
|||
| **Thank You** | |||
| - Disable not available merge methods [#946](https://github.com/Microsoft/vscode-pull-request-github/pull/946) by @IllusionMH | |||
| - Fix LGTM.com alerts [#948](https://github.com/Microsoft/vscode-pull-request-github/pull/948) by @samlanning | |||
|
|
|||
| 0.4.0 | |||
|
|
|||
| **Breaking Changes** | |||
| @@ -7,7 +7,7 @@ This extension allows you to review and manage GitHub pull requests in Visual St | |||
| - Validating PRs from within VS Code with easy checkouts. | |||
| - Terminal integration that enables UI and CLIs to co-exist. | |||
|
|
|||
|  | |||
|  | |||
|
|
|||
| # Getting Started | |||
| It's easy to get started with GitHub Pull Requests for Visual Studio Code. Simply follow these steps to get started. | |||
| @@ -16,7 +16,8 @@ It's easy to get started with GitHub Pull Requests for Visual Studio Code. Simpl | |||
| 1. Download the extension from [the marketplace](https://aka.ms/vscodepr-download). | |||
| 1. Reload VS Code after the installation (click the reload button next to the extension). | |||
| 1. Open your desired GitHub repository. | |||
| 1. Go to the SCM Viewlet, and you should see the `GitHub Pull Requests` treeview. On the first load, it will appear collapsed at the bottom of the viewlet. | |||
| 1. If you're using version 0.5.0 of the extension or higher, a new viewlet should be added to the bottom of the activity bar. For older versions, the `GitHub Pull Requests` treeview will appear in the SCM Viewlet. | |||
| 1. You may need to configure the `githubPullRequests.remotes` setting, by default the extension will look for PRs for `origin` and `upstream`. If you have different remotes, add them to the remotes list. | |||
| 1. A notification should appear asking you to sign in to GitHub; follow the directions to authenticate. | |||
| 1. You should be good to go! | |||
|
|
|||
| @@ -12,10 +12,10 @@ | |||
| }, | |||
| "enableProposedApi": true, | |||
| "preview": true, | |||
| "version": "0.4.0", | |||
| "version": "0.6.1", | |||
| "publisher": "GitHub", | |||
| "engines": { | |||
| "vscode": "^1.31.0" | |||
| "vscode": "^1.34.0" | |||
| }, | |||
| "categories": [ | |||
| "Other" | |||
| @@ -138,7 +138,7 @@ | |||
| { | |||
| "id": "github-pull-requests", | |||
| "title": "GitHub Pull Requests", | |||
| "icon": "resources/icons/github.svg" | |||
| "icon": "resources/icons/light/github.svg" | |||
| } | |||
| ] | |||
| }, | |||
| @@ -147,24 +147,24 @@ | |||
| { | |||
| "id": "pr:github", | |||
| "name": "GitHub Pull Requests", | |||
| "when": "!config.githubPullRequests.showInSCM && config.git.enabled && github:hasGitHubRemotes && workspaceFolderCount != 0" | |||
| "when": "!config.githubPullRequests.showInSCM && config.git.enabled" | |||
| }, | |||
| { | |||
| "id": "prStatus:github", | |||
| "name": "Changes In Pull Request", | |||
| "when": "!config.githubPullRequests.showInSCM && config.git.enabled && github:hasGitHubRemotes && github:inReviewMode" | |||
| "when": "!config.githubPullRequests.showInSCM && config.git.enabled && github:inReviewMode" | |||
| } | |||
| ], | |||
| "scm": [ | |||
| { | |||
| "id": "pr:scm", | |||
| "name": "GitHub Pull Requests", | |||
| "when": "config.githubPullRequests.showInSCM && config.git.enabled && github:hasGitHubRemotes && workspaceFolderCount != 0" | |||
| "when": "config.githubPullRequests.showInSCM && config.git.enabled" | |||
| }, | |||
| { | |||
| "id": "prStatus:scm", | |||
| "name": "Changes In Pull Request", | |||
| "when": "config.githubPullRequests.showInSCM && config.git.enabled && github:hasGitHubRemotes && github:inReviewMode" | |||
| "when": "config.githubPullRequests.showInSCM && config.git.enabled && github:inReviewMode" | |||
| } | |||
| ] | |||
| }, | |||
| @@ -291,10 +291,45 @@ | |||
| "title": "Sign in to GitHub", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.replyComment", | |||
| "title": "Reply Comment", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.startReview", | |||
| "title": "Start Review", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.deleteReview", | |||
| "title": "Delete Review", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.editComment", | |||
| "title": "Edit Comment", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.deleteComment", | |||
| "title": "Delete Comment", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.finishReview", | |||
| "title": "Finish Review", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.signinAndRefreshList", | |||
| "title": "Sign in and Refresh", | |||
| "category": "GitHub Pull Requests" | |||
| }, | |||
| { | |||
| "command": "pr.configureRemotes", | |||
| "title": "Configure Remotes...", | |||
| "category": "GitHub Pull Requests" | |||
| } | |||
| ], | |||
| "menus": { | |||
| @@ -370,17 +405,41 @@ | |||
| { | |||
| "command": "pr.copyCommitHash", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.replyComment", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.startReview", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.deleteReview", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.editComment", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.deleteComment", | |||
| "when": "false" | |||
| }, | |||
| { | |||
| "command": "pr.finishReview", | |||
| "when": "false" | |||
| } | |||
| ], | |||
| "view/title": [ | |||
| { | |||
| "command": "pr.create", | |||
| "when": "view =~ /pr/", | |||
| "when": "view =~ /pr:/", | |||
| "group": "navigation" | |||
| }, | |||
| { | |||
| "command": "pr.refreshList", | |||
| "when": "view =~ /pr/", | |||
| "when": "view =~ /pr:/", | |||
| "group": "navigation" | |||
| }, | |||
| { | |||
| @@ -392,22 +451,22 @@ | |||
| "view/item/context": [ | |||
| { | |||
| "command": "pr.pick", | |||
| "when": "view =~ /pr/ && viewItem =~ /pullrequest(:local)?:nonactive|description/", | |||
| "when": "view =~ /pr:/ && viewItem =~ /pullrequest(:local)?:nonactive|description/", | |||
| "group": "pullrequest@1" | |||
| }, | |||
| { | |||
| "command": "pr.refreshPullRequest", | |||
| "when": "view =~ /pr/ && viewItem =~ /pullrequest|description/", | |||
| "when": "view =~ /pr:/ && viewItem =~ /pullrequest|description/", | |||
| "group": "pullrequest@2" | |||
| }, | |||
| { | |||
| "command": "pr.openPullRequestInGitHub", | |||
| "when": "view =~ /pr/ && viewItem =~ /pullrequest|description/", | |||
| "when": "view =~ /pr:/ && viewItem =~ /pullrequest|description/", | |||
| "group": "pullrequest@3" | |||
| }, | |||
| { | |||
| "command": "pr.deleteLocalBranch", | |||
| "when": "view =~ /pr/ && viewItem =~ /pullrequest:local:nonactive/", | |||
| "when": "view =~ /pr:/ && viewItem =~ /pullrequest:local:nonactive/", | |||
| "group": "pullrequest@4" | |||
| }, | |||
| { | |||
| @@ -468,6 +527,8 @@ | |||
| "@types/node": "*", | |||
| "@types/node-fetch": "^2.1.4", | |||
| "@types/query-string": "^6.1.1", | |||
| "@types/react": "^16.8.4", | |||
| "@types/react-dom": "^16.8.2", | |||
| "@types/webpack": "^4.4.10", | |||
| "@types/ws": "^5.1.2", | |||
| "css-loader": "^0.28.11", | |||
| @@ -478,12 +539,15 @@ | |||
| "gulp-util": "^3.0.8", | |||
| "minimist": "^1.2.0", | |||
| "mocha": "^5.2.0", | |||
| "react": "^16.8.2", | |||
| "react-dom": "^16.8.2", | |||
| "style-loader": "^0.21.0", | |||
| "svg-inline-loader": "^0.8.0", | |||
| "ts-loader": "^4.0.1", | |||
| "tslint": "^5.11.0", | |||
| "tslint-webpack-plugin": "^1.2.2", | |||
| "typescript": "^2.1.4", | |||
| "vscode": "^1.1.33", | |||
| "webpack": "^4.1.0", | |||
| "webpack-cli": "^3.2.1" | |||
| }, | |||
| @@ -508,7 +572,6 @@ | |||
| "ssh-config": "^1.1.3", | |||
| "telemetry-github": "https://github.com/shana/telemetry/releases/download/0.3.2/telemetry-github-v0.3.2.tgz", | |||
| "tunnel": "0.0.6", | |||
| "vscode": "^1.1.18", | |||
| "vsls": "^0.3.967", | |||
| "ws": "^6.0.0" | |||
| }, | |||
| @@ -0,0 +1,22 @@ | |||
| import * as React from 'react'; | |||
| import { useContext, useState, useEffect } from 'react'; | |||
| import { render } from 'react-dom'; | |||
| import { Overview } from './overview'; | |||
| import PullRequestContext from './context'; | |||
| import { PullRequest } from './cache'; | |||
|
|
|||
| export function main() { | |||
| render( | |||
| <Root>{pr => <Overview {...pr} />}</Root> | |||
| , document.getElementById('app')); | |||
| } | |||
|
|
|||
| function Root({ children }) { | |||
| const ctx = useContext(PullRequestContext); | |||
| const [pr, setPR] = useState<PullRequest>(ctx.pr); | |||
| useEffect(() => { | |||
| ctx.onchange = setPR; | |||
| setPR(ctx.pr); | |||
| }, []); | |||
| return pr ? children(pr) : 'Loading...'; | |||
| } | |||
| @@ -36,19 +36,18 @@ export interface PullRequest { | |||
| } | |||
|
|
|||
| export function getState(): PullRequest { | |||
| return vscode.getState() || {}; | |||
| return vscode.getState(); | |||
| } | |||
|
|
|||
| export function setState(pullRequest: PullRequest): void { | |||
| let oldPullRequest = getState(); | |||
|
|
|||
| if (oldPullRequest.number && oldPullRequest.number === pullRequest.number) { | |||
| pullRequest = Object.assign(pullRequest, { | |||
| pendingCommentText: oldPullRequest.pendingCommentText | |||
| }); | |||
| if (oldPullRequest && | |||
| oldPullRequest.number && oldPullRequest.number === pullRequest.number) { | |||
| pullRequest.pendingCommentText = oldPullRequest.pendingCommentText; | |||
| } | |||
|
|
|||
| vscode.setState(pullRequest); | |||
| if (pullRequest) { vscode.setState(pullRequest); } | |||
| } | |||
|
|
|||
| export function updateState(data: Partial<PullRequest>): void { | |||
Oops, something went wrong.