Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 2e18532

Browse files
Merge branch 'master' into features/inline-comment-edit-and-delete
2 parents 83591f1 + 8a53fe3 commit 2e18532

File tree

5 files changed

+23
-37
lines changed

5 files changed

+23
-37
lines changed

src/GitHub.App/Services/TeamExplorerContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async void Refresh()
7878
var newBranchName = repo?.CurrentBranch?.Name;
7979
var newHeadSha = repo?.CurrentBranch?.Sha;
8080
var newTrackedSha = repo?.CurrentBranch?.TrackedSha;
81-
var newPullRequest = await pullRequestService.GetPullRequestForCurrentBranch(repo);
81+
var newPullRequest = repo != null ? await pullRequestService.GetPullRequestForCurrentBranch(repo) : null;
8282

8383
if (newRepositoryPath != repositoryPath)
8484
{

src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Globalization;
23
using System.Collections.Generic;
34
using System.ComponentModel.Composition;
45
using System.IO;
@@ -328,7 +329,7 @@ public async Task InitializeAsync(
328329
LocalRepository = localRepository;
329330
RemoteRepositoryOwner = owner;
330331
Number = number;
331-
WebUrl = LocalRepository.CloneUrl.ToRepositoryUrl().Append("pull/" + number);
332+
WebUrl = localRepository.CloneUrl.ToRepositoryUrl(owner).Append("pull/" + number);
332333
modelService = await modelServiceFactory.CreateAsync(connection);
333334

334335
await Refresh();

src/GitHub.UI/Controls/ScrollingVerticalStackPanel.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,25 @@ protected override Size ArrangeOverride(Size finalSize)
179179
{
180180
var isFixed = GetIsFixed(child);
181181
var x = isFixed ? 0 : -HorizontalOffset;
182-
var childRect = new Rect(x, y, child.DesiredSize.Width, child.DesiredSize.Height);
182+
var width = child.DesiredSize.Width;
183+
184+
if (isFixed)
185+
{
186+
switch (child.HorizontalAlignment)
187+
{
188+
case HorizontalAlignment.Stretch:
189+
width = finalSize.Width;
190+
break;
191+
case HorizontalAlignment.Right:
192+
x = finalSize.Width - child.DesiredSize.Width;
193+
break;
194+
case HorizontalAlignment.Center:
195+
x = (finalSize.Width - child.DesiredSize.Width) / 2;
196+
break;
197+
}
198+
}
199+
200+
var childRect = new Rect(x, y, width, child.DesiredSize.Height);
183201
child.Arrange(childRect);
184202
y += child.DesiredSize.Height;
185203

src/GitHub.VisualStudio/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,11 @@
22
using System.Reflection;
33
using System.Runtime.InteropServices;
44
using System.Windows.Markup;
5-
using Microsoft.VisualStudio.Shell;
65

76
[assembly: AssemblyTitle("GitHub.VisualStudio")]
87
[assembly: AssemblyDescription("GitHub for Visual Studio VSPackage")]
98
[assembly: Guid("fad77eaa-3fe1-4c4b-88dc-3753b6263cd7")]
109

11-
[assembly: ProvideBindingRedirection(AssemblyName = "GitHub.UI", CodeBase = @"$PackageFolder$\GitHub.UI.dll",
12-
OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = AssemblyVersionInformation.Version)]
13-
[assembly: ProvideBindingRedirection(AssemblyName = "GitHub.VisualStudio.UI", CodeBase = @"$PackageFolder$\GitHub.VisualStudio.UI.dll",
14-
OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = AssemblyVersionInformation.Version)]
15-
[assembly: ProvideBindingRedirection(AssemblyName = "GitHub.Exports", CodeBase = @"$PackageFolder$\GitHub.Exports.dll",
16-
OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = AssemblyVersionInformation.Version)]
17-
[assembly: ProvideBindingRedirection(AssemblyName = "GitHub.Extensions", CodeBase = @"$PackageFolder$\GitHub.Extensions.dll",
18-
OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = AssemblyVersionInformation.Version)]
19-
[assembly: ProvideBindingRedirection(AssemblyName = "GitHub.Logging", CodeBase = @"$PackageFolder$\GitHub.Logging.dll",
20-
OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = AssemblyVersionInformation.Version)]
21-
22-
[assembly: ProvideCodeBase(AssemblyName = "Octokit", CodeBase = @"$PackageFolder$\Octokit.dll")]
23-
[assembly: ProvideCodeBase(AssemblyName = "Octokit.GraphQL", CodeBase = @"$PackageFolder$\Octokit.GraphQL.dll")]
24-
[assembly: ProvideCodeBase(AssemblyName = "Octokit.GraphQL.Core", CodeBase = @"$PackageFolder$\Octokit.GraphQL.Core.dll")]
25-
[assembly: ProvideCodeBase(AssemblyName = "LibGit2Sharp", CodeBase = @"$PackageFolder$\LibGit2Sharp.dll")]
26-
[assembly: ProvideCodeBase(AssemblyName = "Splat", CodeBase = @"$PackageFolder$\Splat.dll")]
27-
[assembly: ProvideCodeBase(AssemblyName = "Rothko", CodeBase = @"$PackageFolder$\Rothko.dll")]
28-
[assembly: ProvideCodeBase(AssemblyName = "Serilog", CodeBase = @"$PackageFolder$\Serilog.dll")]
29-
[assembly: ProvideCodeBase(AssemblyName = "Serilog.Enrichers.Thread", CodeBase = @"$PackageFolder$\Serilog.Enrichers.Thread.dll")]
30-
[assembly: ProvideCodeBase(AssemblyName = "Serilog.Sinks.File", CodeBase = @"$PackageFolder$\Serilog.Sinks.File.dll")]
31-
[assembly: ProvideCodeBase(AssemblyName = "Markdig", CodeBase = @"$PackageFolder$\Markdig.dll")]
32-
[assembly: ProvideCodeBase(AssemblyName = "Markdig.Wpf", CodeBase = @"$PackageFolder$\Markdig.Wpf.dll")]
33-
[assembly: ProvideCodeBase(AssemblyName = "Newtonsoft.Json", CodeBase = @"$PackageFolder$\Newtonsoft.Json.dll")]
34-
3510
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.VisualStudio.Views")]
3611
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.VisualStudio.Views.Dialog")]
3712
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.VisualStudio.Views.GitHubPane")]

src/GitHub.VisualStudio/Views/GitHubPane/PullRequestDetailView.xaml.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,7 @@ public PullRequestDetailView()
4141
void DoOpenOnGitHub()
4242
{
4343
var browser = VisualStudioBrowser;
44-
var cloneUrl = ViewModel.LocalRepository.CloneUrl;
45-
var url = ToPullRequestUrl(cloneUrl.Host, ViewModel.RemoteRepositoryOwner, ViewModel.LocalRepository.Name, ViewModel.Model.Number);
46-
browser.OpenUrl(url);
47-
}
48-
49-
static Uri ToPullRequestUrl(string host, string owner, string repositoryName, int number)
50-
{
51-
var url = string.Format(CultureInfo.InvariantCulture, "https://{0}/{1}/{2}/pull/{3}", host, owner, repositoryName, number);
52-
return new Uri(url);
44+
browser.OpenUrl(ViewModel.WebUrl);
5345
}
5446

5547
void OpenHyperlink(object sender, ExecutedRoutedEventArgs e)

0 commit comments

Comments
 (0)