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

Commit 31b12e9

Browse files
authored
Merge branch 'master' into feature/cache-versioning
2 parents acca60c + d3b561d commit 31b12e9

File tree

170 files changed

+10937
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+10937
-190
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ProjectConfiguration>
2+
<Settings>
3+
<CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4+
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully>
5+
</Settings>
6+
</ProjectConfiguration>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<ProjectConfiguration>
2+
<Settings>
3+
<InstrumentOutputAssembly>True</InstrumentOutputAssembly>
4+
<PreventSigningOfAssembly>True</PreventSigningOfAssembly>
5+
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully>
6+
</Settings>
7+
</ProjectConfiguration>

GitHubVS.sln

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
44
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.VisualStudio", "src\GitHub.VisualStudio\GitHub.VisualStudio.csproj", "{11569514-5AE5-4B5B-92A2-F10B0967DE5F}"
7+
ProjectSection(ProjectDependencies) = postProject
8+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B} = {7F5ED78B-74A3-4406-A299-70CFB5885B8B}
9+
EndProjectSection
710
EndProject
811
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Meta", "Meta", "{72036B62-2FA6-4A22-8B33-69F698A18CF1}"
912
ProjectSection(SolutionItems) = preProject
@@ -106,6 +109,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.StartPage", "src\Git
106109
EndProject
107110
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI.UnitTests", "test\GitHub.UI.UnitTests\GitHub.UI.UnitTests.csproj", "{110B206F-8554-4B51-BF86-94DAA32F5E26}"
108111
EndProject
112+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.InlineReviews", "src\GitHub.InlineReviews\GitHub.InlineReviews.csproj", "{7F5ED78B-74A3-4406-A299-70CFB5885B8B}"
113+
EndProject
114+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.InlineReviews.UnitTests", "test\GitHub.InlineReviews.UnitTests\GitHub.InlineReviews.UnitTests.csproj", "{17EB676B-BB91-48B5-AA59-C67695C647C2}"
115+
EndProject
109116
Global
110117
GlobalSection(SolutionConfigurationPlatforms) = preSolution
111118
Debug|Any CPU = Debug|Any CPU
@@ -128,7 +135,6 @@ Global
128135
{11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|x86.ActiveCfg = Release|Any CPU
129136
{11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|x86.Build.0 = Release|Any CPU
130137
{596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
131-
{596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
132138
{596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|x86.ActiveCfg = Debug|Any CPU
133139
{596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|x86.Build.0 = Debug|Any CPU
134140
{596595A6-2A3C-469E-9386-9E3767D863A5}.Publish|Any CPU.ActiveCfg = Release|Any CPU
@@ -238,7 +244,6 @@ Global
238244
{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|x86.ActiveCfg = Release|Any CPU
239245
{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|x86.Build.0 = Release|Any CPU
240246
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
241-
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
242247
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|x86.ActiveCfg = Debug|Any CPU
243248
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|x86.Build.0 = Debug|Any CPU
244249
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Publish|Any CPU.ActiveCfg = Release|Any CPU
@@ -444,6 +449,30 @@ Global
444449
{110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|Any CPU.Build.0 = Release|Any CPU
445450
{110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|x86.ActiveCfg = Release|Any CPU
446451
{110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|x86.Build.0 = Release|Any CPU
452+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
453+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
454+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|x86.ActiveCfg = Debug|Any CPU
455+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|x86.Build.0 = Debug|Any CPU
456+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|Any CPU.ActiveCfg = Release|Any CPU
457+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|Any CPU.Build.0 = Release|Any CPU
458+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|x86.ActiveCfg = Release|Any CPU
459+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|x86.Build.0 = Release|Any CPU
460+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
461+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|Any CPU.Build.0 = Release|Any CPU
462+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|x86.ActiveCfg = Release|Any CPU
463+
{7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|x86.Build.0 = Release|Any CPU
464+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
465+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
466+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|x86.ActiveCfg = Debug|Any CPU
467+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|x86.Build.0 = Debug|Any CPU
468+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|Any CPU.ActiveCfg = Release|Any CPU
469+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|Any CPU.Build.0 = Release|Any CPU
470+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|x86.ActiveCfg = Release|Any CPU
471+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|x86.Build.0 = Release|Any CPU
472+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
473+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|Any CPU.Build.0 = Release|Any CPU
474+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|x86.ActiveCfg = Release|Any CPU
475+
{17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|x86.Build.0 = Release|Any CPU
447476
EndGlobalSection
448477
GlobalSection(SolutionProperties) = preSolution
449478
HideSolutionNode = FALSE
@@ -468,5 +497,6 @@ Global
468497
{DD99FD0F-82F6-4C30-930E-4A1D0DF01D65} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AB9}
469498
{7B835A7D-CF94-45E8-B191-96F5A4FE26A8} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
470499
{110B206F-8554-4B51-BF86-94DAA32F5E26} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
500+
{17EB676B-BB91-48B5-AA59-C67695C647C2} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
471501
EndGlobalSection
472502
EndGlobal

src/DesignTimeStyleHelper/App.config

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</dependentAssembly>
1212
<dependentAssembly>
1313
<assemblyIdentity name="Microsoft.VisualStudio.Imaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
14-
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
14+
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
1515
</dependentAssembly>
1616
<dependentAssembly>
1717
<assemblyIdentity name="Microsoft.TeamFoundation.Controls" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -33,6 +33,18 @@
3333
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
3434
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
3535
</dependentAssembly>
36+
<dependentAssembly>
37+
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
38+
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
39+
</dependentAssembly>
40+
<dependentAssembly>
41+
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
42+
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
43+
</dependentAssembly>
44+
<dependentAssembly>
45+
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
46+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
47+
</dependentAssembly>
3648
</assemblyBinding>
3749
</runtime>
3850
</configuration>

src/GitHub.App/Api/ApiClient.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ public IObservable<Repository> CreateRepository(NewRepository repository, string
6262
return (isUser ? client.Create(repository) : client.Create(login, repository));
6363
}
6464

65+
public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
66+
string owner,
67+
string name,
68+
int number,
69+
string body,
70+
string commitId,
71+
string path,
72+
int position)
73+
{
74+
var comment = new PullRequestReviewCommentCreate(body, commitId, path, position);
75+
return gitHubClient.PullRequest.Comment.Create(owner, name, number, comment);
76+
}
77+
78+
public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
79+
string owner,
80+
string name,
81+
int number,
82+
string body,
83+
int inReplyTo)
84+
{
85+
var comment = new PullRequestReviewCommentReplyCreate(body, inReplyTo);
86+
return gitHubClient.PullRequest.Comment.CreateReply(owner, name, number, comment);
87+
}
88+
6589
public IObservable<Gist> CreateGist(NewGist newGist)
6690
{
6791
return gitHubClient.Gist.Create(newGist);
@@ -239,6 +263,11 @@ public IObservable<Unit> DeleteApplicationAuthorization(int id, [AllowNull]strin
239263
return gitHubClient.Authorization.Delete(id, twoFactorAuthorizationCode);
240264
}
241265

266+
public IObservable<IssueComment> GetIssueComments(string owner, string name, int number)
267+
{
268+
return gitHubClient.Issue.Comment.GetAllForIssue(owner, name, number);
269+
}
270+
242271
public IObservable<PullRequest> GetPullRequest(string owner, string name, int number)
243272
{
244273
return gitHubClient.PullRequest.Get(owner, name, number);
@@ -249,6 +278,11 @@ public IObservable<PullRequestFile> GetPullRequestFiles(string owner, string nam
249278
return gitHubClient.PullRequest.Files(owner, name, number);
250279
}
251280

281+
public IObservable<PullRequestReviewComment> GetPullRequestReviewComments(string owner, string name, int number)
282+
{
283+
return gitHubClient.PullRequest.Comment.GetAll(owner, name, number);
284+
}
285+
252286
public IObservable<PullRequest> GetPullRequestsForRepository(string owner, string name)
253287
{
254288
return gitHubClient.PullRequest.GetAllForRepository(owner, name,

src/GitHub.App/GitHub.App.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
<Reference Include="WindowsBase" />
133133
</ItemGroup>
134134
<ItemGroup>
135+
<Compile Include="Models\IssueCommentModel.cs" />
136+
<Compile Include="Models\PullRequestReviewCommentModel.cs" />
135137
<Compile Include="ViewModels\ViewModelBase.cs" />
136138
<None Include="..\..\script\Key.snk" Condition="$(Buildtype) == 'Internal'">
137139
<Link>Key.snk</Link>

src/GitHub.App/GlobalSuppressions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
55
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
66
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
7+
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
8+
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
79
// This file is used by Code Analysis to maintain SuppressMessage
810
// attributes that are applied to this project.
911
// Project-level suppressions either have no target or are given

src/GitHub.App/Models/DisconnectedRepositoryHosts.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public DisconnectedRepositoryHost()
3131
public ReactiveList<IAccount> Accounts { get; private set; }
3232
public string Title { get; private set; }
3333
public IAccount User { get; private set; }
34+
[AllowNull]
3435
public IModelService ModelService { get; private set; }
3536

3637
public IObservable<AuthenticationResult> LogIn(string usernameOrEmail, string password)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
3+
namespace GitHub.Models
4+
{
5+
public class IssueCommentModel : ICommentModel
6+
{
7+
public string Body { get; set; }
8+
public int Id { get; set; }
9+
public DateTimeOffset CreatedAt { get; set; }
10+
public IAccount User { get; set; }
11+
}
12+
}

src/GitHub.App/Models/PullRequestFileModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ public PullRequestFileModel(string fileName, string sha, PullRequestFileStatus s
1111
Status = status;
1212
}
1313

14-
public string FileName { get; set; }
15-
public string Sha { get; set; }
16-
public PullRequestFileStatus Status { get; set; }
14+
public string FileName { get; }
15+
public string Sha { get; }
16+
public PullRequestFileStatus Status { get; }
1717
}
1818
}

0 commit comments

Comments
 (0)