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

Commit 2423b1c

Browse files
authored
Merge branch 'master' into fixes/debug-files-missing
2 parents a008deb + c1687a7 commit 2423b1c

File tree

12 files changed

+97
-23
lines changed

12 files changed

+97
-23
lines changed

script

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@
333333
<HintPath>..\..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
334334
<Private>True</Private>
335335
</Reference>
336+
<Reference Include="NLog, Version=3.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
337+
<HintPath>..\..\packages\NLog.3.1.0.0\lib\net45\NLog.dll</HintPath>
338+
<Private>True</Private>
339+
</Reference>
336340
<Reference Include="PresentationCore" />
337341
<Reference Include="PresentationFramework" />
338342
<Reference Include="rothko, Version=0.0.2.0, Culture=neutral, PublicKeyToken=9f664c41f503810a, processorArchitecture=MSIL">

src/GitHub.InlineReviews/Services/IPullRequestSessionService.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ Task<byte[]> ExtractFileFromGit(
8585
/// <summary>
8686
/// Posts a new PR review comment.
8787
/// </summary>
88-
/// <param name="repository">The repository.</param>
88+
/// <param name="localRepository">The local repository.</param>
89+
/// <param name="remoteRepositoryOwner">The owner of the repository fork to post to.</param>
8990
/// <param name="user">The user posting the comment.</param>
9091
/// <param name="number">The pull request number.</param>
9192
/// <param name="body">The comment body.</param>
@@ -94,7 +95,8 @@ Task<byte[]> ExtractFileFromGit(
9495
/// <param name="position">The line index in the diff to comment on.</param>
9596
/// <returns>A model representing the posted comment.</returns>
9697
Task<IPullRequestReviewCommentModel> PostReviewComment(
97-
ILocalRepositoryModel repository,
98+
ILocalRepositoryModel localRepository,
99+
string remoteRepositoryOwner,
98100
IAccount user,
99101
int number,
100102
string body,
@@ -105,14 +107,16 @@ Task<IPullRequestReviewCommentModel> PostReviewComment(
105107
/// <summary>
106108
/// Posts a PR review comment reply.
107109
/// </summary>
108-
/// <param name="repository">The repository.</param>
110+
/// <param name="localRepository">The local repository.</param>
111+
/// <param name="remoteRepositoryOwner">The owner of the repository fork to post to.</param>
109112
/// <param name="user">The user posting the comment.</param>
110113
/// <param name="number">The pull request number.</param>
111114
/// <param name="body">The comment body.</param>
112115
/// <param name="inReplyTo">The comment ID to reply to.</param>
113116
/// <returns>A model representing the posted comment.</returns>
114117
Task<IPullRequestReviewCommentModel> PostReviewComment(
115-
ILocalRepositoryModel repository,
118+
ILocalRepositoryModel localRepository,
119+
string remoteRepositoryOwner,
116120
IAccount user,
117121
int number,
118122
string body,

src/GitHub.InlineReviews/Services/PullRequestSession.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public async Task<IPullRequestReviewCommentModel> PostReviewComment(string body,
121121
{
122122
var model = await service.PostReviewComment(
123123
LocalRepository,
124+
RepositoryOwner,
124125
User,
125126
PullRequest.Number,
126127
body,
@@ -136,6 +137,7 @@ public async Task<IPullRequestReviewCommentModel> PostReviewComment(string body,
136137
{
137138
var model = await service.PostReviewComment(
138139
LocalRepository,
140+
RepositoryOwner,
139141
User,
140142
PullRequest.Number,
141143
body,

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using GitHub.Primitives;
1010
using GitHub.Services;
1111
using LibGit2Sharp;
12+
using NLog;
1213

1314
namespace GitHub.InlineReviews.Services
1415
{
@@ -137,20 +138,21 @@ public async Task<string> GetPullRequestMergeBase(ILocalRepositoryModel reposito
137138

138139
/// <inheritdoc/>
139140
public async Task<IPullRequestReviewCommentModel> PostReviewComment(
140-
ILocalRepositoryModel repository,
141+
ILocalRepositoryModel localRepository,
142+
string remoteRepositoryOwner,
141143
IAccount user,
142144
int number,
143145
string body,
144146
string commitId,
145147
string path,
146148
int position)
147149
{
148-
var address = HostAddress.Create(repository.CloneUrl.Host);
150+
var address = HostAddress.Create(localRepository.CloneUrl.Host);
149151
var apiClient = await apiClientFactory.Create(address);
150152

151153
var result = await apiClient.CreatePullRequestReviewComment(
152-
repository.Owner,
153-
repository.Name,
154+
remoteRepositoryOwner,
155+
localRepository.Name,
154156
number,
155157
body,
156158
commitId,
@@ -176,18 +178,19 @@ public async Task<IPullRequestReviewCommentModel> PostReviewComment(
176178

177179
/// <inheritdoc/>
178180
public async Task<IPullRequestReviewCommentModel> PostReviewComment(
179-
ILocalRepositoryModel repository,
181+
ILocalRepositoryModel localRepository,
182+
string remoteRepositoryOwner,
180183
IAccount user,
181184
int number,
182185
string body,
183186
int inReplyTo)
184187
{
185-
var address = HostAddress.Create(repository.CloneUrl.Host);
188+
var address = HostAddress.Create(localRepository.CloneUrl.Host);
186189
var apiClient = await apiClientFactory.Create(address);
187190

188191
var result = await apiClient.CreatePullRequestReviewComment(
189-
repository.Owner,
190-
repository.Name,
192+
remoteRepositoryOwner,
193+
localRepository.Name,
191194
number,
192195
body,
193196
inReplyTo);

src/GitHub.InlineReviews/ViewModels/CommentViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using GitHub.Extensions;
88
using GitHub.Models;
99
using GitHub.UI;
10+
using NLog;
1011
using Octokit;
1112
using ReactiveUI;
1213

@@ -17,6 +18,7 @@ namespace GitHub.InlineReviews.ViewModels
1718
/// </summary>
1819
public class CommentViewModel : ReactiveObject, ICommentViewModel
1920
{
21+
static readonly Logger log = LogManager.GetCurrentClassLogger();
2022
string body;
2123
string errorMessage;
2224
bool isReadOnly;
@@ -167,6 +169,7 @@ async Task DoCommitEdit(object unused)
167169
}
168170

169171
ErrorMessage = message;
172+
log.Error("Error posting inline comment.", e);
170173
}
171174
}
172175

src/GitHub.InlineReviews/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net452" />
3131
<package id="Microsoft.VisualStudio.Validation" version="14.1.111" targetFramework="net452" />
3232
<package id="Microsoft.VSSDK.BuildTools" version="14.3.25407" targetFramework="net452" developmentDependency="true" />
33+
<package id="NLog" version="3.1.0.0" targetFramework="net461" />
3334
<package id="Rothko" version="0.0.2-ghfvs" targetFramework="net461" />
3435
<package id="Rx-Core" version="2.2.5-custom" targetFramework="net461" />
3536
<package id="Rx-Interfaces" version="2.2.5-custom" targetFramework="net461" />

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<NuGetPackageImportStamp>
1212
</NuGetPackageImportStamp>
1313
<TargetFrameworkProfile />
14-
<ApplicationVersion>2.3.0.24</ApplicationVersion>
14+
<ApplicationVersion>2.3.0.26</ApplicationVersion>
1515
<OutputPath>..\..\build\$(Configuration)\</OutputPath>
1616
<VsixType>v3</VsixType>
1717
<IsProductComponent>false</IsProductComponent>

src/GitHub.VisualStudio/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="2.3.0.24" Language="en-US" Publisher="GitHub, Inc" />
4+
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="2.3.0.26" Language="en-US" Publisher="GitHub, Inc" />
55
<DisplayName>GitHub Extension for Visual Studio</DisplayName>
66
<Description xml:space="preserve">A Visual Studio Extension that brings the GitHub Flow into Visual Studio.</Description>
77
<PackageId>GitHub.VisualStudio</PackageId>

src/MsiInstaller/Version.wxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Include>
3-
<?define VersionNumber="2.3.0.24" ?>
3+
<?define VersionNumber="2.3.0.26" ?>
44
</Include>

0 commit comments

Comments
 (0)