diff --git a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs index 2b0061d8..e6f07b9d 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs @@ -95,7 +95,7 @@ namespace Octokit.Reactive { return _client.Delete(repositoryId).ToObservable(); } - + /// /// Transfers the ownership of the specified repository. /// @@ -127,7 +127,7 @@ namespace Octokit.Reactive public IObservable Transfer(long repositoryId, RepositoryTransfer repositoryTransfer) { Ensure.ArgumentNotNull(repositoryTransfer, nameof(repositoryTransfer)); - + return _client.Transfer(repositoryId, repositoryTransfer).ToObservable(); } diff --git a/Octokit.Tests.Integration/Clients/CheckRunsClientTests.cs b/Octokit.Tests.Integration/Clients/CheckRunsClientTests.cs index 7adaf503..4aa479d0 100644 --- a/Octokit.Tests.Integration/Clients/CheckRunsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/CheckRunsClientTests.cs @@ -96,8 +96,9 @@ namespace Octokit.Tests.Integration.Clients var checkRun = await _githubAppInstallation.Check.Run.Create(repoContext.RepositoryOwner, repoContext.RepositoryName, newCheckRun); // Update the check run - var update = new CheckRunUpdate("new-name") + var update = new CheckRunUpdate { + Name = "new-name", Status = CheckStatus.InProgress }; var result = await _githubAppInstallation.Check.Run.Update(repoContext.RepositoryOwner, repoContext.RepositoryName, checkRun.Id, update); @@ -127,8 +128,9 @@ namespace Octokit.Tests.Integration.Clients var checkRun = await _githubAppInstallation.Check.Run.Create(repoContext.RepositoryId, newCheckRun); // Update the check run - var update = new CheckRunUpdate("new-name") + var update = new CheckRunUpdate { + Name = "new-name", Status = CheckStatus.InProgress }; var result = await _githubAppInstallation.Check.Run.Update(repoContext.RepositoryId, checkRun.Id, update); diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs index 4c1020f1..aaad44d2 100644 --- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs @@ -1719,11 +1719,11 @@ public class RepositoriesClientTests var transfer = new RepositoryTransfer(newOwner); await github.Repository.Transfer(context.RepositoryOwner, context.RepositoryName, transfer); var transferred = await github.Repository.Get(newOwner, context.RepositoryName); - + Assert.Equal(newOwner, transferred.Owner.Login); } } - + [IntegrationTest] public async Task TransfersFromOrgToUserById() { @@ -1751,11 +1751,11 @@ public class RepositoriesClientTests var transfer = new RepositoryTransfer(newOwner); await github.Repository.Transfer(context.RepositoryOwner, context.RepositoryName, transfer); var transferred = await github.Repository.Get(newOwner, context.RepositoryName); - + Assert.Equal(newOwner, transferred.Owner.Login); } } - + [IntegrationTest] public async Task TransfersFromUserToOrgById() { @@ -1783,7 +1783,8 @@ public class RepositoriesClientTests using (var repositoryContext = await github.CreateRepositoryContext(newRepo)) { NewTeam team = new NewTeam(Helper.MakeNameWithTimestamp("transfer-team")); - using (var teamContext = await github.CreateTeamContext(Helper.Organization, team)) { + using (var teamContext = await github.CreateTeamContext(Helper.Organization, team)) + { var transferTeamIds = new int[] { teamContext.TeamId }; var transfer = new RepositoryTransfer(newOwner, transferTeamIds); await github.Repository.Transfer( @@ -1799,7 +1800,7 @@ public class RepositoriesClientTests } } } - + [IntegrationTest] public async Task TransfersFromUserToOrgWithTeamsById() { @@ -1811,7 +1812,8 @@ public class RepositoriesClientTests using (var repositoryContext = await github.CreateRepositoryContext(newRepo)) { NewTeam team = new NewTeam(Helper.MakeNameWithTimestamp("transfer-team")); - using (var teamContext = await github.CreateTeamContext(Helper.Organization, team)) { + using (var teamContext = await github.CreateTeamContext(Helper.Organization, team)) + { var transferTeamIds = new int[] { teamContext.TeamId }; var transfer = new RepositoryTransfer(newOwner, transferTeamIds); await github.Repository.Transfer(repositoryContext.RepositoryId, transfer); diff --git a/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs index c97c2528..6d7f653a 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs @@ -17,10 +17,10 @@ namespace Octokit.Tests.Integration.Clients var readme = await github.Repository.Content.GetReadme("octokit", "octokit.net"); Assert.Equal("README.md", readme.Name); - string readMeHtml = await readme.GetHtmlContent(); - Assert.True(readMeHtml.StartsWith("
x), hook.Config.Keys.OrderBy(x => x)); + Assert.Equal(webHookConfig.Values.OrderBy(x => x), hook.Config.Values.OrderBy(x => x)); Assert.Equal(false, hook.Active); } @@ -279,8 +279,8 @@ namespace Octokit.Tests.Integration.Clients Assert.Equal(baseHookUrl + "/pings", hook.PingUrl); Assert.NotNull(hook.CreatedAt); Assert.NotNull(hook.UpdatedAt); - Assert.Equal(webHookConfig.Keys, hook.Config.Keys); - Assert.Equal(webHookConfig.Values, hook.Config.Values); + Assert.Equal(webHookConfig.Keys.OrderBy(x => x), hook.Config.Keys.OrderBy(x => x)); + Assert.Equal(webHookConfig.Values.OrderBy(x => x), hook.Config.Values.OrderBy(x => x)); Assert.Equal(false, hook.Active); } diff --git a/Octokit.Tests.Integration/Reactive/ObservableCheckRunsClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableCheckRunsClientTests.cs index 7c8352c4..e084c3ae 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableCheckRunsClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableCheckRunsClientTests.cs @@ -98,8 +98,9 @@ namespace Octokit.Tests.Integration.Reactive var checkRun = await _githubAppInstallation.Check.Run.Create(repoContext.RepositoryOwner, repoContext.RepositoryName, newCheckRun); // Update the check run - var update = new CheckRunUpdate("new-name") + var update = new CheckRunUpdate { + Name = "new-name", Status = CheckStatus.InProgress }; var result = await _githubAppInstallation.Check.Run.Update(repoContext.RepositoryOwner, repoContext.RepositoryName, checkRun.Id, update); @@ -129,8 +130,9 @@ namespace Octokit.Tests.Integration.Reactive var checkRun = await _githubAppInstallation.Check.Run.Create(repoContext.RepositoryId, newCheckRun); // Update the check run - var update = new CheckRunUpdate("new-name") + var update = new CheckRunUpdate { + Name = "new-name", Status = CheckStatus.InProgress }; var result = await _githubAppInstallation.Check.Run.Update(repoContext.RepositoryId, checkRun.Id, update); diff --git a/Octokit.Tests/Clients/CheckRunsClientTests.cs b/Octokit.Tests/Clients/CheckRunsClientTests.cs index 546c9da4..8cffdd33 100644 --- a/Octokit.Tests/Clients/CheckRunsClientTests.cs +++ b/Octokit.Tests/Clients/CheckRunsClientTests.cs @@ -87,7 +87,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new CheckRunsClient(connection); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; await client.Update("fake", "repo", 1, update); @@ -103,7 +103,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new CheckRunsClient(connection); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; await client.Update(1, 1, update); @@ -119,7 +119,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new CheckRunsClient(connection); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; await Assert.ThrowsAsync(() => client.Update(null, "repo", 1, update)); await Assert.ThrowsAsync(() => client.Update("fake", null, 1, update)); @@ -132,7 +132,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new CheckRunsClient(connection); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; await Assert.ThrowsAsync(() => client.Update("", "repo", 1, update)); await Assert.ThrowsAsync(() => client.Update("fake", "", 1, update)); @@ -610,7 +610,7 @@ namespace Octokit.Tests.Clients await Assert.ThrowsAsync(() => client.GetAllAnnotations(null, "repo", 1, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllAnnotations("fake", null, 1, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllAnnotations("fake", "repo", 1, null)); - + await Assert.ThrowsAsync(() => client.GetAllAnnotations(1, 1, null)); } diff --git a/Octokit.Tests/Clients/ProjectCardsClientTests.cs b/Octokit.Tests/Clients/ProjectCardsClientTests.cs index 7021c2e7..35937cd7 100644 --- a/Octokit.Tests/Clients/ProjectCardsClientTests.cs +++ b/Octokit.Tests/Clients/ProjectCardsClientTests.cs @@ -44,9 +44,9 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "projects/columns/1/cards"), - Arg.Is>(x => - x.Count == 1 - && x["archived_state"] == "not_archived"), + Arg.Is>(x => + x.Count == 1 + && x["archived_state"] == "not_archived"), "application/vnd.github.inertia-preview+json", Args.ApiOptions); } diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs index 2ca658c4..fbca404f 100644 --- a/Octokit.Tests/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs @@ -227,7 +227,7 @@ namespace Octokit.Tests.Clients await Assert.ThrowsAsync( () => client.Transfer("owner", "name", null)); } - + [Fact] public async Task EnsuresNonNullArgumentsById() { @@ -258,7 +258,7 @@ namespace Octokit.Tests.Clients { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); await client.Transfer("owner", "name", transfer); @@ -269,13 +269,13 @@ namespace Octokit.Tests.Clients Arg.Any(), Arg.Any()); } - + [Fact] public async Task RequestsCorrectUrlById() { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); var repositoryId = 1; @@ -293,7 +293,7 @@ namespace Octokit.Tests.Clients { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); await client.Transfer("owner", "name", transfer); @@ -305,13 +305,13 @@ namespace Octokit.Tests.Clients t => t.NewOwner == "newOwner" && object.Equals(teamId, t.TeamIds)), Arg.Any()); } - + [Fact] public async Task SendsCorrectRequestById() { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); var repositoryId = 1; @@ -330,7 +330,7 @@ namespace Octokit.Tests.Clients { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); await client.Transfer("owner", "name", transfer); @@ -348,7 +348,7 @@ namespace Octokit.Tests.Clients { var connection = Substitute.For(); var client = new RepositoriesClient(connection); - var teamId = new int[2] {35, 42}; + var teamId = new int[2] { 35, 42 }; var transfer = new RepositoryTransfer("newOwner", teamId); var repositoryId = 1; diff --git a/Octokit.Tests/Models/RepositoryTransferTest.cs b/Octokit.Tests/Models/RepositoryTransferTest.cs index 300923f9..ea9148f0 100644 --- a/Octokit.Tests/Models/RepositoryTransferTest.cs +++ b/Octokit.Tests/Models/RepositoryTransferTest.cs @@ -7,21 +7,21 @@ namespace Octokit.Tests.Models { public static readonly string emptyName = ""; public static readonly string nonemptyName = "name"; - public static readonly int[] emptyTeamId = new int[] {}; - public static readonly int[] nonemptyTeamId = new int[] {1, 2, 3}; + public static readonly int[] emptyTeamId = new int[] { }; + public static readonly int[] nonemptyTeamId = new int[] { 1, 2, 3 }; public class TheSingleArgumentConstructor { [Fact] public void ChecksForEmptyName() { - Assert.Throws(() => {new RepositoryTransfer(emptyName);}); + Assert.Throws(() => { new RepositoryTransfer(emptyName); }); } [Fact] public void ChecksForNullName() { - Assert.Throws(() => {new RepositoryTransfer(null);}); + Assert.Throws(() => { new RepositoryTransfer(null); }); } [Fact] @@ -45,25 +45,25 @@ namespace Octokit.Tests.Models [Fact] public void ChecksForEmptyName() { - Assert.Throws(() => {new RepositoryTransfer(emptyName, nonemptyTeamId);}); + Assert.Throws(() => { new RepositoryTransfer(emptyName, nonemptyTeamId); }); } [Fact] public void ChecksForNullName() { - Assert.Throws(() => {new RepositoryTransfer(null, nonemptyTeamId);}); + Assert.Throws(() => { new RepositoryTransfer(null, nonemptyTeamId); }); } [Fact] public void ChecksForEmptyTeamId() { - Assert.Throws(() => {new RepositoryTransfer(nonemptyName, emptyTeamId);}); + Assert.Throws(() => { new RepositoryTransfer(nonemptyName, emptyTeamId); }); } [Fact] public void ChecksForNullTeamId() { - Assert.Throws(() => {new RepositoryTransfer(nonemptyName, null);}); + Assert.Throws(() => { new RepositoryTransfer(nonemptyName, null); }); } [Fact] diff --git a/Octokit.Tests/Reactive/ObservableCheckRunsClientTests.cs b/Octokit.Tests/Reactive/ObservableCheckRunsClientTests.cs index 8391353e..5a2036bc 100644 --- a/Octokit.Tests/Reactive/ObservableCheckRunsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableCheckRunsClientTests.cs @@ -82,7 +82,7 @@ namespace Octokit.Tests.Clients var gitHubClient = Substitute.For(); var client = new ObservableCheckRunsClient(gitHubClient); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; client.Update("fake", "repo", 1, update); @@ -95,7 +95,7 @@ namespace Octokit.Tests.Clients var gitHubClient = Substitute.For(); var client = new ObservableCheckRunsClient(gitHubClient); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; client.Update(1, 1, update); @@ -108,7 +108,7 @@ namespace Octokit.Tests.Clients var gitHubClient = Substitute.For(); var client = new ObservableCheckRunsClient(gitHubClient); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; Assert.Throws(() => client.Update(null, "repo", 1, update)); Assert.Throws(() => client.Update("fake", null, 1, update)); @@ -121,7 +121,7 @@ namespace Octokit.Tests.Clients var gitHubClient = Substitute.For(); var client = new ObservableCheckRunsClient(gitHubClient); - var update = new CheckRunUpdate("status") { Status = CheckStatus.InProgress }; + var update = new CheckRunUpdate { Status = CheckStatus.InProgress }; Assert.Throws(() => client.Update("", "repo", 1, update)); Assert.Throws(() => client.Update("fake", "", 1, update)); diff --git a/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs b/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs index b274e740..2ccd59fa 100644 --- a/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs @@ -89,7 +89,7 @@ namespace Octokit.Tests.Clients var client = new ObservableCheckSuitesClient(gitHubClient); client.GetAllForReference(1, "ref"); - + connection.Received().Get>( Arg.Is(u => u.ToString() == "repositories/1/commits/ref/check-suites"), Args.EmptyDictionary, diff --git a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs index 7bbfc4e8..60b42ce2 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs @@ -37,7 +37,7 @@ namespace Octokit.Tests.Reactive Assert.Throws( () => client.Transfer("owner", "name", null)); } - + [Fact] public void EnsuresNonNullArgumentsById() { diff --git a/Octokit/Helpers/Ensure.cs b/Octokit/Helpers/Ensure.cs index 59a7a23b..727c5422 100644 --- a/Octokit/Helpers/Ensure.cs +++ b/Octokit/Helpers/Ensure.cs @@ -59,7 +59,7 @@ namespace Octokit { ArgumentNotNull(value, name); if (Enumerable.Any(value)) return; - + throw new ArgumentException("List cannot be empty", name); } } diff --git a/Octokit/Models/Request/CheckRunUpdate.cs b/Octokit/Models/Request/CheckRunUpdate.cs index b42ca3cd..767dc444 100644 --- a/Octokit/Models/Request/CheckRunUpdate.cs +++ b/Octokit/Models/Request/CheckRunUpdate.cs @@ -11,24 +11,22 @@ namespace Octokit /// /// Creates a new Check Run /// - /// Required. The name of the check. For example, "code-coverage". - public CheckRunUpdate(string name) + public CheckRunUpdate() { - Name = name; } /// - /// Required. The name of the check. For example, "code-coverage". + /// The name of the check. For example, "code-coverage" /// - public string Name { get; private set; } + public string Name { get; set; } /// - /// The URL of the integrator's site that has the full details of the check. + /// The URL of the integrator's site that has the full details of the check /// public string DetailsUrl { get; set; } /// - /// A reference for the run on the integrator's system. + /// A reference for the run on the integrator's system /// public string ExternalId { get; set; } @@ -43,23 +41,23 @@ namespace Octokit public DateTimeOffset StartedAt { get; set; } /// - /// Required if you provide a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url. - /// Note: Providing conclusion will automatically set the status parameter to completed. + /// Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url. + /// Note: Providing conclusion will automatically set the status parameter to completed /// public StringEnum? Conclusion { get; set; } /// - /// Required if you provide conclusion. The time the check completed. + /// Required if you provide conclusion. The time the check completed /// public DateTimeOffset? CompletedAt { get; set; } /// - /// Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. + /// Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run /// public NewCheckRunOutput Output { get; set; } /// - /// Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. + /// Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted /// public IReadOnlyList Actions { get; set; } diff --git a/Octokit/Models/Request/CheckSuiteTriggerRequest.cs b/Octokit/Models/Request/CheckSuiteTriggerRequest.cs index 564f903d..74336620 100644 --- a/Octokit/Models/Request/CheckSuiteTriggerRequest.cs +++ b/Octokit/Models/Request/CheckSuiteTriggerRequest.cs @@ -21,7 +21,7 @@ namespace Octokit /// /// The sha of the head commit /// - public string HeadSha { get; private set; } + public string HeadSha { get; protected set; } internal virtual string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "HeadSha: {0}", HeadSha); } diff --git a/Octokit/Models/Request/NewCheckRun.cs b/Octokit/Models/Request/NewCheckRun.cs index 6828a32c..8b86b167 100644 --- a/Octokit/Models/Request/NewCheckRun.cs +++ b/Octokit/Models/Request/NewCheckRun.cs @@ -6,23 +6,70 @@ using System.Globalization; namespace Octokit { [DebuggerDisplay("{DebuggerDisplay,nq}")] - public class NewCheckRun : CheckRunUpdate + public class NewCheckRun { /// /// Creates a new Check Run /// /// Required. The name of the check. For example, "code-coverage" /// Required. The SHA of the commit - public NewCheckRun(string name, string headSha) : base(name) + public NewCheckRun(string name, string headSha) { + Name = name; HeadSha = headSha; } + /// + /// Required. The name of the check. For example, "code-coverage" + /// + public string Name { get; protected set; } + /// /// Required. The SHA of the commit /// - public string HeadSha { get; private set; } + public string HeadSha { get; protected set; } - internal new string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Name: {0}, HeadSha: {1}, Status: {2}, Conclusion: {3}", Name, HeadSha, Status, Conclusion); + /// + /// The URL of the integrator's site that has the full details of the check + /// + public string DetailsUrl { get; set; } + + /// + /// A reference for the run on the integrator's system + /// + public string ExternalId { get; set; } + + /// + /// The current status. Can be one of queued, in_progress, or completed. Default: queued + /// + public StringEnum Status { get; set; } + + /// + /// The time that the check run began + /// + public DateTimeOffset StartedAt { get; set; } + + /// + /// Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url. + /// Note: Providing conclusion will automatically set the status parameter to completed + /// + public StringEnum? Conclusion { get; set; } + + /// + /// Required if you provide conclusion. The time the check completed + /// + public DateTimeOffset? CompletedAt { get; set; } + + /// + /// Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run + /// + public NewCheckRunOutput Output { get; set; } + + /// + /// Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted + /// + public IReadOnlyList Actions { get; set; } + + internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Name: {0}, HeadSha: {1}, Status: {2}, Conclusion: {3}", Name, HeadSha, Status, Conclusion); } } diff --git a/Octokit/Models/Request/NewCheckSuite.cs b/Octokit/Models/Request/NewCheckSuite.cs index e4590db6..9a3208e6 100644 --- a/Octokit/Models/Request/NewCheckSuite.cs +++ b/Octokit/Models/Request/NewCheckSuite.cs @@ -18,7 +18,7 @@ namespace Octokit /// /// Required. The sha of the head commit /// - public string HeadSha { get; private set; } + public string HeadSha { get; protected set; } internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "HeadSha: {0}", HeadSha); } diff --git a/Octokit/Models/Response/CheckRunOutputResponse.cs b/Octokit/Models/Response/CheckRunOutputResponse.cs index 7503ff9b..2aade56f 100644 --- a/Octokit/Models/Response/CheckRunOutputResponse.cs +++ b/Octokit/Models/Response/CheckRunOutputResponse.cs @@ -15,7 +15,7 @@ namespace Octokit { Title = title; Summary = summary; - Text = text; + Text = text; AnnotationsCount = annotationsCount; } diff --git a/Octokit/Models/Response/EventInfo.cs b/Octokit/Models/Response/EventInfo.cs index 7daf2e15..3e5c31d9 100644 --- a/Octokit/Models/Response/EventInfo.cs +++ b/Octokit/Models/Response/EventInfo.cs @@ -279,19 +279,19 @@ namespace Octokit /// [Parameter(Value = "commit-commented")] CommitCommented, - + /// /// A user with write permissions marked an issue as a duplicate of another issue or a pull request as a duplicate of another pull request. /// [Parameter(Value = "marked_as_duplicate")] MarkedAsDuplicate, - + /// /// An issue that a user had previously marked as a duplicate of another issue is no longer considered a duplicate. /// [Parameter(Value = "unmarked_as_duplicate")] UnmarkedAsDuplicate, - + /// /// An issue comment was deleted. /// diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 89908e7f..3c8c2604 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,42 @@ +### New in 0.31.0 (released 21/07/2018) + +## Advisories and Breaking Changes + +- None + +## Release Notes + +### Milestone: GitHub Apps + +**Features/Enhancements** + +- Implemented Check Suites component of [New Checks Api (Public Beta)](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) - [#1846](https://github.com/octokit/octokit.net/pull/1846) via [@ryangribble](https://github.com/ryangribble), [@Cyberboss](https://github.com/Cyberboss) +- Implemented Check Runs component of [New Checks Api (Public Beta)](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) - [#1847](https://github.com/octokit/octokit.net/pull/1847) via [@ryangribble](https://github.com/ryangribble), [@Cyberboss](https://github.com/Cyberboss) + + +### Milestone: None + +**Features/Enhancements** + +- Add new `EventInfoState` values (`MarkedAsDuplicate`, `UnmarkedAsDuplicate` and `CommentDeleted`) - [#1818](https://github.com/octokit/octokit.net/pull/1818) via [@mirsaeedi](https://github.com/mirsaeedi) +- Add GraphQL NodeId property to all affected response models - [#1806](https://github.com/octokit/octokit.net/pull/1806) via [@ryangribble](https://github.com/ryangribble) +- Implemented [New API parameters for Project Card archiving (Preview)](https://developer.github.com/changes/2018-06-27-project-card-archiving/) including `ProjectCard.Archived`, `ProjectCardUpdate.Archived` and new `ProjectCardRequest` request - [#1842](https://github.com/octokit/octokit.net/pull/1842) via [@ryangribble](https://github.com/ryangribble) +- Implement support for [Archiving repositories](https://developer.github.com/changes/2017-11-08-archiving-repositories/) including adding `Archived` property to `Repository` response model, adding the ability to archive a repository via `UpdateRepository.Archived` request, and filtering repo/issues searches with `SearchRepositoriesRequest.Archived` and `SearchIssuesRequest.Archived` - [#1845](https://github.com/octokit/octokit.net/pull/1845) via [@jguevara](https://github.com/jguevara), [@ryangribble](https://github.com/ryangribble) + +**Fixes** + +- Fix exception in `RepositoriesClient.GetAllLanguages()` when no languages exist - [#1831](https://github.com/octokit/octokit.net/pull/1831) via [@ryangribble](https://github.com/ryangribble) + +**Housekeeping** + +- Remove nuget dependency on `SourceLink.Create.GitHub` package - [#1822](https://github.com/octokit/octokit.net/pull/1822) via [@ryangribble](https://github.com/ryangribble) + +**Documentation Updates** + +- Clarify the rate limit `Reset` field is in UTC - [#1819](https://github.com/octokit/octokit.net/pull/1819) via [@mirsaeedi](https://github.com/mirsaeedi) +- Revise GitHub Apps walkthrough documentation to provide more clarity - [#1824](https://github.com/octokit/octokit.net/pull/1824) via [@ryangribble](https://github.com/ryangribble) + + ### New in 0.30.0 (released 17/06/2018) ## Advisories and Breaking Changes