Add proof of concept, GitHub for Visual Studio integration#1
Add proof of concept, GitHub for Visual Studio integration#1jcansdale wants to merge 2 commits intolaurentkempe:masterfrom
Conversation
Find the current PR diff URL using:
`(string)AppDomain.CurrentDomain.GetData("PReview.diff.url")`
This is just a proof of concept!
Bump Microsoft.VSSDK.BuildTools to version 14.3.25420.
|
Updated original description with some screen-grabs. |
|
Hi Jamie,
Nice to read that you love GitDiffMargin! PReview was a quick one evening hack to improve the efficiency of my team in our reviewing experience with git. Nevertheless, I am happy to see that it got some interest, so thanks for the PR. I like the idea to have an integration with GitHub extension for Visual Studio, this can definitely improve the situation.
For your current PR #1 I would need to get the same as what we get with this https://patch-diff.githubusercontent.com/raw/laurentkempe/PReview/pull/1.diff
Absolutely
I guess that would be definitely an idea! Cheers |
I'm curious to know how much difference there is between what PReview does and GitDiffMargin? Could GitDiffMargin have an option to toggle between showing the diff to the staging area and the diff to master (or some other target branch)? Would this be similar to what PReview currently does? |
In fact the tricky part is not to get the data from the web, it is more to have a user friendly way so that the user can tell us which PR he wants to review, for that Github for Visual Studio is great!
Very few, in fact! This is why I could do it in one evening 😄 The tricky part was the Pull Request Filter button in VS which didn't had documentation or sample
I think it was the same idea of @sharwell here laurentkempe/GitDiffMargin#68 |
Hi Laurent,
I love the work you've done on GitDiffMargin. When I was looking at that, I noticed you'd also started the PReview project. 😄
This PR is a very simple proof of concept hack that lets PReview know which PR has been checked out using the PR functionality in GitHub for Visual Studio. All it does is expose the diff URL via some AppDomain data:
I also needed to update one of the NuGet packages to build/run with VS2015 R3.
To make it work you will need to use a similarly hacked branch of GitHubVS:
https://github.com/jcansdale/VisualStudio/tree/PReview-integration-hack
Try try it, do the following:
Note, this won't currently work with a private repo,
I'd be interested to know what information you would like from the PReview end?
I'm guessing knowing the PR target branch would be more useful? You could then generate the patch/diff file without needing to know the .diff URL (I'm assuming).
At the moment some branches are tagged with the PR # the
.git\configfile like this:Maybe the target branch could also be added there? That way GitHubVS wouldn't even need to be running for PReview to find the PR details. Something like this:
I'd be interested to hear your thoughts. 😄
Cheers,
Jamie.