Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
microsoft/vscode-pull-request-github
1AmNegan/vscode-pull-request-github
Acidburn0zzz/vscode-pullrequest-github
Adam13531/vscode-pull-request-github
BuddyLReno/vscode-pull-request-github
CmF1472/vscode-pull-request-github
Cohedrin/vscode-pull-request-github
Desires/vscode-pull-request-github
Desires69/vscode-pull-request-github
Everton1982/vscode-pull-request-github
Gyanachand1/vscode-pull-request-github
Ikuyadeu/vscode-pull-request-github
IllusionMH/vscode-pull-request-github
JeffreyCA/vscode-pull-request-github
Kuqd/vscode-pull-request-github
Mr-Darfler/vscode-pull-request-github
Niyamasu/vscode-pull-request-github
Phrohdoh/vscode-pull-request-github
RMacfarlane/vscode-pull-request-github
Reddmist/vscode-pull-request-github
SDanS/vscode-pull-request-bitbucket
SingletonJava/vscode-pull-request-github
SzymonKrysztofiak/vscode-pull-request-github
TristanFAURE/vscode-pull-request-bitbucket
Tunous/vscode-pull-request-github
Vipadasangkaew/vscode-pull-request-github
adrinjalali/vscode-pull-request-github
ahmadawais/vscode-pull-request-github
alaney/vscode-pull-request-bitbucket
ananya/vscode-pull-request-github
archanaserver/vscode-pull-request-github
arkon/vscode-pull-request-github
atlassian/vscode-pull-request-bitbucket
ayissijoachim/vscode-pull-request-github
barshan23/vscode-pull-request-github
bartoszmajsak/vscode-pull-request-github
dalavanmanphonsy/vscode-pull-request-github
davevh/vscode-pull-request-github
david-risney/vscode-pull-request-github
delold/vscode-pull-request-github
doneladams/vscode-pull-request-github
donjulian80050/vscode-pull-request-github
dotty2883/vscode-pull-request-github
edwinfrc/vscode-pull-request-github
emtee40/vscode-pull-request-github
emtei/vscode-pull-request-github
ferugi/vscode-pull-request-github
fuafa/vscode-pull-request-github
fyesoft/vscode-pull-request-github
gimenete/vscode-pull-request-github
ginonott/vscode-pull-request-github
goloveychuk/vscode-pull-request-github
goncharov/vscode-pull-request-github
hartra344/vscode-pull-request-github
homitc/vscode-pull-request-github
hougii/vscode-pull-request-github
hudsonrb92/vscode-pull-request-github
igeligel/vscode-pull-request-github
issaouedraogo/vscode-pull-request-github
jenniemanphonsy/vscode-pull-request-github
jepetty/vscode-pull-request-github
jerrymajewski/vscode-pull-request-github
jlangston/vscode-pull-request-bitbucket
justinliew/vscode-pull-request-github
kiliman/vscode-pull-request-github
kitfit-dave/vscode-pull-request-github
kyleroush/vscode-pull-request-github
lasloyu/vscode-pull-request-github
lihuanshuai/vscode-pull-request-github
loveconlee/vscode-pull-request-github
lumaxis/vscode-pull-request-github
madhankumar028/vscode-pull-request-github
malwilley/vscode-pull-request-github
mayrock/vscode-pull-request-github
mikemichaelis/vscode-pull-request-stash
mkonikov/vscode-pull-request-github
mmanela/vscode-pull-request-github
mmhand123/vscode-pull-request-github
morishita-ai/vscode-pull-request-github
moujian/vscode-pull-request-github
noohnooh/vscode-pull-request-github
peterblazejewicz/vscode-pull-request-github
rebornix/vscode-pull-request-github
rusnasonov/vscode-pull-request-github
ruyadorno/vscode-pull-request-github
samlanning/vscode-pull-request-github
saurabhshri/vscode-pull-request-github
sbatten/vscode-pull-request-github
selbachgra/vscode-pull-request-github
sguthals/vscode-pull-request-github
shana/vscode-pull-request-github
shatgupt/vscode-pull-request-github
sinette/vscode-pull-request-github
smerrell/vscode-pull-request-github
sparkboom/vscode-pull-request-github
sunzoje/vscode-pull-request-github
sup95/vscode-pull-request-github
tashby/vscode-pull-request-github
thomas0306/vscode-pull-request-github
ulihorn/vscode-pull-request-github
vscode-toolbox/vscode-pull-request-github
wyze/vscode-pull-request-github
xxxjoachim121/vscode-pull-request-github
yamgent/vscode-pull-request-github
yazovskiy/vscode-pull-request-github
yoh1496/vscode-pull-request-github
Nothing to show
base: v0.5.0
Choose a Head Repository
microsoft/vscode-pull-request-github
1AmNegan/vscode-pull-request-github
Acidburn0zzz/vscode-pullrequest-github
Adam13531/vscode-pull-request-github
BuddyLReno/vscode-pull-request-github
CmF1472/vscode-pull-request-github
Cohedrin/vscode-pull-request-github
Desires/vscode-pull-request-github
Desires69/vscode-pull-request-github
Everton1982/vscode-pull-request-github
Gyanachand1/vscode-pull-request-github
Ikuyadeu/vscode-pull-request-github
IllusionMH/vscode-pull-request-github
JeffreyCA/vscode-pull-request-github
Kuqd/vscode-pull-request-github
Mr-Darfler/vscode-pull-request-github
Niyamasu/vscode-pull-request-github
Phrohdoh/vscode-pull-request-github
RMacfarlane/vscode-pull-request-github
Reddmist/vscode-pull-request-github
SDanS/vscode-pull-request-bitbucket
SingletonJava/vscode-pull-request-github
SzymonKrysztofiak/vscode-pull-request-github
TristanFAURE/vscode-pull-request-bitbucket
Tunous/vscode-pull-request-github
Vipadasangkaew/vscode-pull-request-github
adrinjalali/vscode-pull-request-github
ahmadawais/vscode-pull-request-github
alaney/vscode-pull-request-bitbucket
ananya/vscode-pull-request-github
archanaserver/vscode-pull-request-github
arkon/vscode-pull-request-github
atlassian/vscode-pull-request-bitbucket
ayissijoachim/vscode-pull-request-github
barshan23/vscode-pull-request-github
bartoszmajsak/vscode-pull-request-github
dalavanmanphonsy/vscode-pull-request-github
davevh/vscode-pull-request-github
david-risney/vscode-pull-request-github
delold/vscode-pull-request-github
doneladams/vscode-pull-request-github
donjulian80050/vscode-pull-request-github
dotty2883/vscode-pull-request-github
edwinfrc/vscode-pull-request-github
emtee40/vscode-pull-request-github
emtei/vscode-pull-request-github
ferugi/vscode-pull-request-github
fuafa/vscode-pull-request-github
fyesoft/vscode-pull-request-github
gimenete/vscode-pull-request-github
ginonott/vscode-pull-request-github
goloveychuk/vscode-pull-request-github
goncharov/vscode-pull-request-github
hartra344/vscode-pull-request-github
homitc/vscode-pull-request-github
hougii/vscode-pull-request-github
hudsonrb92/vscode-pull-request-github
igeligel/vscode-pull-request-github
issaouedraogo/vscode-pull-request-github
jenniemanphonsy/vscode-pull-request-github
jepetty/vscode-pull-request-github
jerrymajewski/vscode-pull-request-github
jlangston/vscode-pull-request-bitbucket
justinliew/vscode-pull-request-github
kiliman/vscode-pull-request-github
kitfit-dave/vscode-pull-request-github
kyleroush/vscode-pull-request-github
lasloyu/vscode-pull-request-github
lihuanshuai/vscode-pull-request-github
loveconlee/vscode-pull-request-github
lumaxis/vscode-pull-request-github
madhankumar028/vscode-pull-request-github
malwilley/vscode-pull-request-github
mayrock/vscode-pull-request-github
mikemichaelis/vscode-pull-request-stash
mkonikov/vscode-pull-request-github
mmanela/vscode-pull-request-github
mmhand123/vscode-pull-request-github
morishita-ai/vscode-pull-request-github
moujian/vscode-pull-request-github
noohnooh/vscode-pull-request-github
peterblazejewicz/vscode-pull-request-github
rebornix/vscode-pull-request-github
rusnasonov/vscode-pull-request-github
ruyadorno/vscode-pull-request-github
samlanning/vscode-pull-request-github
saurabhshri/vscode-pull-request-github
sbatten/vscode-pull-request-github
selbachgra/vscode-pull-request-github
sguthals/vscode-pull-request-github
shana/vscode-pull-request-github
shatgupt/vscode-pull-request-github
sinette/vscode-pull-request-github
smerrell/vscode-pull-request-github
sparkboom/vscode-pull-request-github
sunzoje/vscode-pull-request-github
sup95/vscode-pull-request-github
tashby/vscode-pull-request-github
thomas0306/vscode-pull-request-github
ulihorn/vscode-pull-request-github
vscode-toolbox/vscode-pull-request-github
wyze/vscode-pull-request-github
xxxjoachim121/vscode-pull-request-github
yamgent/vscode-pull-request-github
yazovskiy/vscode-pull-request-github
yoh1496/vscode-pull-request-github
Nothing to show
compare: master
Commits on Feb 21, 2019
WIP: Bring in React and start converting the overview page.
Title bar looks pretty good, actions are not wired.

Co-Authored-By: Stanley Goldman <stanleygoldman@github.com>
WIP: Spaces are hard.
Co-Authored-By: Stanley Goldman <stanleygoldman@github.com>
Commits on Mar 07, 2019
Commits on Mar 08, 2019
Commits on Mar 14, 2019
queerviolet and Tilde Ann Thurium
WHITESPACE
Co-Authored-By: Tilde Ann Thurium <annthurium@github.com>
queerviolet and Tilde Ann Thurium
Diffs render pretty well.
Co-Authored-By: Tilde Ann Thurium <annthurium@github.com>
queerviolet and Tilde Ann Thurium
Review comments are rendering, things looking pretty good.
Co-Authored-By: Tilde Ann Thurium <annthurium@github.com>
Merge pull request #1041 from Microsoft:rmacfarlane/create-pr
Fix description not displaying after creating a pull request
Commits on Mar 15, 2019
Commits on Mar 19, 2019
Commits on Mar 27, 2019
Commits on Mar 28, 2019
Commits on Mar 29, 2019
Merge pull request #1084 from Microsoft/rebornix/collapsed-review-com…
…ments

Comments collpased for workspace files.
Commits on Mar 30, 2019
Commits on Apr 01, 2019
Commits on Apr 02, 2019
Merge pull request #1092 from Microsoft/rebornix/file-scheme-with-rev…
…iewquery

Create comment threads for files with review query.
Commits on Apr 04, 2019
Commits on Apr 05, 2019
Update CHANGELOG for release.
Co-Authored-By: meaghanlewis@github.com
Update versions in package.json for release.
Co-Authored-By: meaghanlewis@github.com
Merge pull request #1098 from Microsoft/rebornix/uriScheme
Use vscode.env.uriScheme for callback.
Merge pull request #1050 from Microsoft/rebornix/gitprovider
Allow extensions to register git providers
Commits on Apr 08, 2019
Commits on Apr 09, 2019
Commits on Apr 10, 2019
Commits on Apr 15, 2019
Commits on Apr 17, 2019
Tilde Ann Thurium
Tilde Ann Thurium
Merge pull request #1122 from Microsoft/rmacfarlane/gitApi
Fix git onDidOpenRepository eventing
Commits on Apr 18, 2019
Commits on Apr 19, 2019
Fix state management and styling.
- Fix accidental retained state of PR description.
- Add a close review comment panel for pending reviews.
- Styling and functionality to display replacement icon
- Improve styling of No Description Provided.
Commits on Apr 22, 2019
Rebase atop master, and fix action bar actions:
  - Fix action bar alignment.
  - Update timeline locally when we post a comment.
  - Append reviews to state.
Commits on Apr 25, 2019
Decrease time to enter review mode.
Previously, we awaited the fetch of additional PR data, then checked out
the branch. Now, we attempt to checkout the branch, and then we fetch
additional data.

We also add more specific status bar messages, and immediately update
the status bar message once the branch is checked out, indicating to
the user that they can go about their day while we fetch additional
information.

Tested manually, on fast / slow / nonexistent connections, with branches
that both do and do not exist locally (the latter fail, as we would
expect).
Commits on Apr 30, 2019
Merge remote-tracking branch 'remotes/origin/master' into fixes/githu…
…b-enterprise-user-avatar

# Conflicts:
#	src/github/githubRepository.ts
Commits on May 01, 2019
Merge pull request #1121 from Microsoft/fixes/github-enterprise-user-…
…avatar

Pull Request Tree GitHub Enterprise Avatars
Commits on May 02, 2019
Merge pull request #1131 from Microsoft/qv/decrease-perceived-checkou…
…t-latency

Decrease time to enter review mode.
Merge pull request #1139 from Microsoft/sticky-credential-input
Setting ignoreFocusOut for credential operations
Commits on May 03, 2019
Commits on May 06, 2019
Invert default avatar icons when the theme is light.
Co-Authored-By: stanleygoldman@github.com
Fix spacing form spacing and alignment.
Co-Authored-By: stanleygoldman@github.com
Toggle the status checks open state when statuses update.
Co-Authored-By: stanleygoldman@github.com
Retain comment frame when editing standalone comments.
Co-Authored-By: stanleygoldman@github.com
Update PR description correctly.
Co-Authored-By: stanleygoldman@github.com
Commits on May 07, 2019
Merge pull request #1146 from microsoft/enterprise-avatar-on-create-c…
…omment

Checking if the repository returns avatars
Commits on May 08, 2019
Merge pull request #1096 from microsoft/qv/react
Render the overview page with React
Showing with 4,458 additions and 3,797 deletions.
  1. BIN .readme/demo.gif
  2. +41 −0 CHANGELOG.md
  3. +3 −2 README.md
  4. +77 −14 package.json
  5. +22 −0 preview-src/app.tsx
  6. +5 −6 preview-src/cache.ts
  7. +195 −0 preview-src/comment.tsx
  8. +174 −0 preview-src/context.tsx
  9. +54 −0 preview-src/diff.tsx
  10. +107 −0 preview-src/header.tsx
  11. +16 −0 preview-src/icon.tsx
  12. +107 −18 preview-src/index.css
  13. +2 −336 preview-src/index.ts
  14. +11 −0 preview-src/markdown.tsx
  15. +189 −0 preview-src/merge.tsx
  16. +1 −0 preview-src/message.ts
  17. +26 −0 preview-src/overview.tsx
  18. +0 −1,259 preview-src/pullRequestOverviewRenderer.ts
  19. +67 −0 preview-src/sidebar.tsx
  20. +14 −0 preview-src/space.tsx
  21. +145 −0 preview-src/timeline.tsx
  22. +13 −0 preview-src/timestamp.tsx
  23. +1 −1 preview-src/tsconfig.json
  24. +13 −0 preview-src/user.tsx
  25. +6 −0 resources/icons/dark/github.svg
  26. 0 resources/icons/{ → light}/github.svg
  27. +224 −0 src/api/api.d.ts
  28. +82 −0 src/api/api1.ts
  29. +3 −3 src/authentication/githubServer.ts
  30. +1 −7 src/authentication/keychain.ts
  31. +49 −2 src/commands.ts
  32. +1 −1 src/common/diffHunk.ts
  33. +1 −1 src/common/remote.ts
  34. +2 −0 src/common/resources.ts
  35. +5 −2 src/common/timelineEvent.ts
  36. +1 −2 src/common/uri.ts
  37. +318 −0 src/common/utils.ts
  38. +20 −9 src/extension.ts
  39. +0 −119 src/git/api.ts
  40. +0 −66 src/git/model.ts
  41. +20 −0 src/gitProviders/api.ts
  42. +34 −0 src/gitProviders/builtinGit.ts
  43. +88 −0 src/gitProviders/vsls.ts
  44. +31 −8 src/{git → gitProviders}/vslsguest.ts
  45. +12 −6 src/{git → gitProviders}/vslshost.ts
  46. +90 −0 src/github/commands.ts
  47. +10 −6 src/github/credentials.ts
  48. +76 −19 src/github/githubRepository.ts
  49. +1 −1 src/github/interface.ts
  50. +1 −1 src/github/pullRequestGitHelper.ts
  51. +92 −27 src/github/pullRequestManager.ts
  52. +30 −12 src/github/pullRequestModel.ts
  53. +9 −14 src/github/pullRequestOverview.ts
  54. +92 −11 src/github/utils.ts
  55. +3 −3 src/test/github/pullRequestModel.test.ts
  56. +363 −105 src/typings/vscode.proposed.d.ts
  57. +1 −1 src/view/gitContentProvider.ts
  58. +92 −192 src/view/prDocumentCommentProvider.ts
  59. +33 −6 src/view/prsTreeDataProvider.ts
  60. +728 −482 src/view/reviewDocumentCommentProvider.ts
  61. +31 −26 src/view/reviewManager.ts
  62. +26 −1 src/view/treeNodes/categoryNode.ts
  63. +11 −9 src/view/treeNodes/fileChangeNode.ts
  64. +472 −363 src/view/treeNodes/pullRequestNode.ts
  65. +116 −656 yarn.lock
BIN +826 KB (130%) .readme/demo.gif
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.

![Demo](https://github.com/Microsoft/vscode-pull-request-github/blob/master/.readme/demo.gif?raw=true)
![Demo](.readme/demo.gif)

# 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.

No commit comments for this range

You can’t perform that action at this time.