diff --git a/.gitignore b/.gitignore index 1128a7f6..54aa4b89 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ bin/**/*.pdb # Roslyn cache directories *.ide/ +*.vs/ # Visual C++ cache files ipch/ diff --git a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs index 8e0c4384..a5d17a88 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs @@ -227,7 +227,7 @@ public class PullRequestsClientTests : IDisposable } [IntegrationTest] - public async Task CannotBeMerged() + public async Task CannotBeMergedDueMismatchConflict() { await CreateTheWorld(); var fakeSha = new string('f', 40); @@ -236,9 +236,27 @@ public class PullRequestsClientTests : IDisposable var pullRequest = await _fixture.Create(Helper.UserName, _context.RepositoryName, newPullRequest); var merge = new MergePullRequest { Sha = fakeSha }; - var ex = await Assert.ThrowsAsync(() => _fixture.Merge(Helper.UserName, _context.RepositoryName, pullRequest.Number, merge)); + var ex = await Assert.ThrowsAsync(() => _fixture.Merge(Helper.UserName, _context.RepositoryName, pullRequest.Number, merge)); - Assert.True(ex.ApiError.Message.StartsWith("Head branch was modified")); + Assert.True(ex.Message.StartsWith("Head branch was modified")); + } + + [IntegrationTest] + public async Task CannotBeMergedDueNotInMergeableState() + { + await CreateTheWorld(); + + var master = await _github.GitDatabase.Reference.Get(Helper.UserName, _context.RepositoryName, "heads/master"); + var newMasterTree = await CreateTree(new Dictionary { { "README.md", "Hello World, we meet again!" } }); + await CreateCommit("baseline for pull request", newMasterTree.Sha, master.Object.Sha); + + var newPullRequest = new NewPullRequest("a pull request", branchName, "master"); + var pullRequest = await _fixture.Create(Helper.UserName, _context.RepositoryName, newPullRequest); + + var merge = new MergePullRequest { Sha = pullRequest.Head.Sha }; + var ex = await Assert.ThrowsAsync(() => _fixture.Merge(Helper.UserName, _context.RepositoryName, pullRequest.Number, merge)); + + Assert.True(ex.Message.Equals("Pull Request is not mergeable")); } [IntegrationTest] diff --git a/Octokit.Tests.Integration/HttpClientAdapterTests.cs b/Octokit.Tests.Integration/HttpClientAdapterTests.cs index 72087350..7acd0876 100644 --- a/Octokit.Tests.Integration/HttpClientAdapterTests.cs +++ b/Octokit.Tests.Integration/HttpClientAdapterTests.cs @@ -19,7 +19,6 @@ public class HttpClientAdapterTests { BaseAddress = new Uri("https://github.global.ssl.fastly.net/", UriKind.Absolute), Endpoint = new Uri("/images/icons/emoji/poop.png?v=5", UriKind.RelativeOrAbsolute), - AllowAutoRedirect = true, Method = HttpMethod.Get }; @@ -41,7 +40,6 @@ public class HttpClientAdapterTests { BaseAddress = new Uri("https://github.global.ssl.fastly.net/", UriKind.Absolute), Endpoint = new Uri("/images/icons/emoji/poop.png?v=5", UriKind.RelativeOrAbsolute), - AllowAutoRedirect = true, Method = HttpMethod.Get, Timeout = TimeSpan.FromMilliseconds(10) }; diff --git a/Octokit.Tests/Clients/RepositoryContentsClientTests.cs b/Octokit.Tests/Clients/RepositoryContentsClientTests.cs index 0688d9db..61b81fd3 100644 --- a/Octokit.Tests/Clients/RepositoryContentsClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryContentsClientTests.cs @@ -56,60 +56,6 @@ namespace Octokit.Tests.Clients } } - public class TheGetArchiveLinkMethod - { - [Fact] - public async Task ReturnsArchiveLinkWithDefaults() - { - var connection = Substitute.For(); - connection.GetRedirect(Args.Uri).Returns(Task.FromResult("https://codeload.github.com/fake/repo/legacy.tar.gz/master")); - var contentsClient = new RepositoryContentsClient(connection); - - var archiveLink = await contentsClient.GetArchiveLink("fake", "repo"); - - connection.Received().GetRedirect(Arg.Is(u => u.ToString() == "repos/fake/repo/tarball/")); - Assert.Equal("https://codeload.github.com/fake/repo/legacy.tar.gz/master", archiveLink); - } - - [Fact] - public async Task ReturnsArchiveLinkAsZipball() - { - var connection = Substitute.For(); - connection.GetRedirect(Args.Uri).Returns(Task.FromResult("https://codeload.github.com/fake/repo/legacy.tar.gz/master")); - var contentsClient = new RepositoryContentsClient(connection); - - var archiveLink = await contentsClient.GetArchiveLink("fake", "repo", ArchiveFormat.Zipball); - - connection.Received().GetRedirect(Arg.Is(u => u.ToString() == "repos/fake/repo/zipball/")); - Assert.Equal("https://codeload.github.com/fake/repo/legacy.tar.gz/master", archiveLink); - } - - [Fact] - public async Task ReturnsArchiveLinkWithSpecifiedValues() - { - var connection = Substitute.For(); - connection.GetRedirect(Args.Uri).Returns(Task.FromResult("https://codeload.github.com/fake/repo/legazy.zip/release")); - var contentsClient = new RepositoryContentsClient(connection); - - var archiveLink = await contentsClient.GetArchiveLink("fake", "repo", ArchiveFormat.Zipball, "release"); - - connection.Received().GetRedirect(Arg.Is(u => u.ToString() == "repos/fake/repo/zipball/release")); - Assert.Equal("https://codeload.github.com/fake/repo/legazy.zip/release", archiveLink); - } - - [Fact] - public async Task EnsuresArgumentsNotNull() - { - var connection = Substitute.For(); - var contentsClient = new RepositoryContentsClient(connection); - - await Assert.ThrowsAsync(() => contentsClient.GetArchiveLink(null, "name")); - await Assert.ThrowsAsync(() => contentsClient.GetArchiveLink("owner", null)); - await Assert.ThrowsAsync(() => contentsClient.GetArchiveLink("", "name")); - await Assert.ThrowsAsync(() => contentsClient.GetArchiveLink("owner", "")); - } - } - public class TheGetContentsMethod { [Fact] diff --git a/Octokit.Tests/SimpleJsonSerializerTests.cs b/Octokit.Tests/SimpleJsonSerializerTests.cs index bd3a375b..bc1c0ad1 100644 --- a/Octokit.Tests/SimpleJsonSerializerTests.cs +++ b/Octokit.Tests/SimpleJsonSerializerTests.cs @@ -1,5 +1,7 @@ using Octokit.Helpers; using Octokit.Internal; +using System.Linq; +using System.Text; using Xunit; namespace Octokit.Tests @@ -64,6 +66,33 @@ namespace Octokit.Tests Assert.Equal("{\"int\":42,\"bool\":true}", json); } + [Fact] + public void HandleUnicodeCharacters() + { + const string backspace = "\b"; + const string tab = "\t"; + + var sb = new StringBuilder(); + sb.Append("My name has Unicode characters"); + Enumerable.Range(0, 19).Select(e => System.Convert.ToChar(e)) + .Aggregate(sb, (a, b) => a.Append(b)); + sb.Append(backspace).Append(tab); + var data = sb.ToString(); + + var json = new SimpleJsonSerializer().Serialize(data); + var lastTabCharacter = (json + .Reverse() + .Skip(1) + .Take(2) + .Reverse() + .Aggregate(new StringBuilder(),(a,b) =>a.Append(b))); + + var deserializeData = new SimpleJsonSerializer().Deserialize(json); + + Assert.True(lastTabCharacter.ToString().Equals("\\t")); + Assert.Equal(data,deserializeData ); + } + [Fact] public void HandlesBase64EncodedStrings() { diff --git a/Octokit/Clients/PullRequestsClient.cs b/Octokit/Clients/PullRequestsClient.cs index e1f2bc99..20f5d6f8 100644 --- a/Octokit/Clients/PullRequestsClient.cs +++ b/Octokit/Clients/PullRequestsClient.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Net; using System.Threading.Tasks; namespace Octokit @@ -115,7 +116,24 @@ namespace Octokit Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(mergePullRequest, "mergePullRequest"); - return ApiConnection.Put(ApiUrls.MergePullRequest(owner, name, number), mergePullRequest); + try + { + return ApiConnection.Put(ApiUrls.MergePullRequest(owner, name, number), mergePullRequest); + } + catch (ApiException ex) + { + if (ex.StatusCode == HttpStatusCode.MethodNotAllowed) + { + throw new PullRequestNotMergeableException(ex.HttpResponse); + } + + if (ex.StatusCode == HttpStatusCode.Conflict) + { + throw new PullRequestMismatchException(ex.HttpResponse); + } + + throw; + } } /// diff --git a/Octokit/Clients/RepositoryContentsClient.cs b/Octokit/Clients/RepositoryContentsClient.cs index 65dde713..7a23a6b6 100644 --- a/Octokit/Clients/RepositoryContentsClient.cs +++ b/Octokit/Clients/RepositoryContentsClient.cs @@ -116,6 +116,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public Task GetArchiveLink(string owner, string name) { return GetArchiveLink(owner, name, ArchiveFormat.Tarball, string.Empty); @@ -144,6 +145,7 @@ namespace Octokit /// The name of the repository /// The format of the archive. Can be either tarball or zipball /// + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public Task GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat) { return GetArchiveLink(owner, name, archiveFormat, string.Empty); @@ -174,6 +176,7 @@ namespace Octokit /// The format of the archive. Can be either tarball or zipball /// A valid Git reference. /// + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public Task GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Exceptions/PullRequestMismatchException.cs b/Octokit/Exceptions/PullRequestMismatchException.cs new file mode 100644 index 00000000..f16504b5 --- /dev/null +++ b/Octokit/Exceptions/PullRequestMismatchException.cs @@ -0,0 +1,64 @@ +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Net; +using System.Runtime.Serialization; + +namespace Octokit +{ + /// + /// Represents an error that occurs when the specified SHA + /// doesn't match the current pull request's HEAD + /// +#if !NETFX_CORE + [Serializable] +#endif + [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", + Justification = "These exceptions are specific to the GitHub API and not general purpose exceptions")] + public class PullRequestMismatchException : ApiException + { + /// + /// Constructs an instace of . + /// + /// + public PullRequestMismatchException(IResponse response) : this(response, null) + { + } + + /// + /// Constructs an instance of . + /// + /// The HTTP payload from the server + /// The inner exception + public PullRequestMismatchException(IResponse response, Exception innerException) + : base(response, innerException) + { + Debug.Assert(response != null && response.StatusCode == HttpStatusCode.Conflict, + "PullRequestMismatchException created with the wrong HTTP status code"); + } + + public override string Message + { + //https://developer.github.com/v3/pulls/#response-if-sha-was-provided-and-pull-request-head-did-not-match + get { return ApiErrorMessageSafe ?? "Head branch was modified. Review and try the merge again."; } + } + +#if !NETFX_CORE + /// + /// Constructs an instance of . + /// + /// + /// The that holds the + /// serialized object data about the exception being thrown. + /// + /// + /// The that contains + /// contextual information about the source or destination. + /// + protected PullRequestMismatchException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } +#endif + } +} diff --git a/Octokit/Exceptions/PullRequestNotMergeableException.cs b/Octokit/Exceptions/PullRequestNotMergeableException.cs new file mode 100644 index 00000000..ca4143dc --- /dev/null +++ b/Octokit/Exceptions/PullRequestNotMergeableException.cs @@ -0,0 +1,64 @@ +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Net; +using System.Runtime.Serialization; + +namespace Octokit +{ + /// + /// Represents an error that occurs when the pull request is in an + /// unmergeable state + /// +#if !NETFX_CORE + [Serializable] +#endif + [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", + Justification = "These exceptions are specific to the GitHub API and not general purpose exceptions")] + public class PullRequestNotMergeableException : ApiException + { + /// + /// Constructs an instance of the class. + /// + /// The HTTP payload from the server + public PullRequestNotMergeableException(IResponse response) : this(response, null) + { + } + + /// + /// Constructs an instance of the class. + /// + /// The HTTP payload from the server + /// The inner exception + public PullRequestNotMergeableException(IResponse response, Exception innerException) + : base(response, innerException) + { + Debug.Assert(response != null && response.StatusCode == HttpStatusCode.MethodNotAllowed, + "PullRequestNotMergeableException created with the wrong HTTP status code"); + } + + public override string Message + { + //https://developer.github.com/v3/pulls/#response-if-merge-cannot-be-performed + get { return ApiErrorMessageSafe ?? "Pull Request is not mergeable"; } + } + +#if !NETFX_CORE + /// + /// Constructs an instance of . + /// + /// + /// The that holds the + /// serialized object data about the exception being thrown. + /// + /// + /// The that contains + /// contextual information about the source or destination. + /// + protected PullRequestNotMergeableException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } +#endif + } +} diff --git a/Octokit/Helpers/ApiExtensions.cs b/Octokit/Helpers/ApiExtensions.cs index 877a6a64..1f35908d 100644 --- a/Octokit/Helpers/ApiExtensions.cs +++ b/Octokit/Helpers/ApiExtensions.cs @@ -90,6 +90,7 @@ namespace Octokit return connection.Get(uri, null, null); } + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public static Task> GetRedirect(this IConnection connection, Uri uri) { Ensure.ArgumentNotNull(connection, "connection"); diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index fb31b68d..dc6e0bdd 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -408,6 +408,7 @@ namespace Octokit /// URI of the API resource to get /// The URL returned by the API in the Location header /// Thrown when an API error occurs, or the API does not respond with a 302 Found + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public async Task GetRedirect(Uri uri) { Ensure.ArgumentNotNull(uri, "uri"); diff --git a/Octokit/Http/IConnection.cs b/Octokit/Http/IConnection.cs index bde7885a..69bdde9b 100644 --- a/Octokit/Http/IConnection.cs +++ b/Octokit/Http/IConnection.cs @@ -43,6 +43,7 @@ namespace Octokit /// To follow redirect links automatically or not /// representing the received HTTP response [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")] + [Obsolete("allowAutoRedirect is no longer respected and will be deprecated in a future release")] Task> Get(Uri uri, IDictionary parameters, string accepts, bool allowAutoRedirect); /// diff --git a/Octokit/Http/IRequest.cs b/Octokit/Http/IRequest.cs index 31fbc578..f17585a3 100644 --- a/Octokit/Http/IRequest.cs +++ b/Octokit/Http/IRequest.cs @@ -14,7 +14,5 @@ namespace Octokit.Internal Uri Endpoint { get; } TimeSpan Timeout { get; } string ContentType { get; } - [Obsolete("This value is no longer respected due to the necessary redirect work")] - bool AllowAutoRedirect { get; } } } diff --git a/Octokit/Http/Request.cs b/Octokit/Http/Request.cs index f9300fd4..72c3e342 100644 --- a/Octokit/Http/Request.cs +++ b/Octokit/Http/Request.cs @@ -22,8 +22,5 @@ namespace Octokit.Internal public Uri Endpoint { get; set; } public TimeSpan Timeout { get; set; } public string ContentType { get; set; } - - [Obsolete("This value is no longer respected due to the necessary redirect work")] - public bool AllowAutoRedirect { get; set; } } } diff --git a/Octokit/Octokit-Mono.csproj b/Octokit/Octokit-Mono.csproj index fd3d9f2c..a1ecc399 100644 --- a/Octokit/Octokit-Mono.csproj +++ b/Octokit/Octokit-Mono.csproj @@ -409,6 +409,8 @@ + + \ No newline at end of file diff --git a/Octokit/Octokit-MonoAndroid.csproj b/Octokit/Octokit-MonoAndroid.csproj index 7a813d2c..a3491a78 100644 --- a/Octokit/Octokit-MonoAndroid.csproj +++ b/Octokit/Octokit-MonoAndroid.csproj @@ -416,6 +416,8 @@ + + diff --git a/Octokit/Octokit-Monotouch.csproj b/Octokit/Octokit-Monotouch.csproj index 5eb79ac2..26f3ba4e 100644 --- a/Octokit/Octokit-Monotouch.csproj +++ b/Octokit/Octokit-Monotouch.csproj @@ -412,6 +412,8 @@ + + diff --git a/Octokit/Octokit-Portable.csproj b/Octokit/Octokit-Portable.csproj index 6757e1a6..133952d8 100644 --- a/Octokit/Octokit-Portable.csproj +++ b/Octokit/Octokit-Portable.csproj @@ -406,6 +406,8 @@ + + diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index d6a2fd84..2f6e1698 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -413,6 +413,8 @@ + + @@ -427,4 +429,4 @@ --> - \ No newline at end of file + diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 2c15e753..aebce259 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -74,6 +74,8 @@ + + diff --git a/Octokit/SimpleJson.cs b/Octokit/SimpleJson.cs index a9e57e7d..e743d627 100644 --- a/Octokit/SimpleJson.cs +++ b/Octokit/SimpleJson.cs @@ -517,7 +517,12 @@ namespace Octokit private const int BUILDER_CAPACITY = 2000; private static readonly char[] EscapeTable; - private static readonly char[] EscapeCharacters = new char[] { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; + private static readonly char[] EscapeCharacters = new char[] { '"', '\\', + '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', + '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', + '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f' + }; private static readonly string EscapeCharactersString = new string(EscapeCharacters); static SimpleJson() @@ -1114,11 +1119,7 @@ namespace Octokit // Non ascii characters are fine, buffer them up and send them to the builder // in larger chunks if possible. The escape table is a 1:1 translation table // with \0 [default(char)] denoting a safe character. - if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) - { - safeCharacterCount++; - } - else + if (Char.IsControl(c) || c == '\"' || c == '\\') { if (safeCharacterCount > 0) { @@ -1127,7 +1128,37 @@ namespace Octokit } builder.Append('\\'); - builder.Append(EscapeTable[c]); + switch (c) + { + case '\\': + builder.Append('\\'); + break; + case '\"': + builder.Append('\"'); + break; + case '\b': + builder.Append('b'); + break; + case '\f': + builder.Append('f'); + break; + case '\r': + builder.Append('r'); + break; + case '\t': + builder.Append('t'); + break; + case '\n': + builder.Append('n'); + break; + default: + builder.AppendFormat("u{0:X4}", (int)c); + break; + } + } + else + { + safeCharacterCount++; } } diff --git a/README.md b/README.md index a990e371..968e9e45 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Octokit - GitHub API Client Library for .NET [![Build Status](https://ci.appveyor.com/api/projects/status/github/octokit/octokit.net?branch=master)](https://ci.appveyor.com/project/Haacked15676/octokit-net) +# Octokit - GitHub API Client Library for .NET +[![Build Status](https://ci.appveyor.com/api/projects/status/github/octokit/octokit.net?branch=master)](https://ci.appveyor.com/project/Haacked15676/octokit-net) [![Join the chat at https://gitter.im/octokit/octokit.net](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/octokit/octokit.net?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![logo](octokit-dotnet_2.png) @@ -34,6 +35,9 @@ or an IObservable based GitHub API client library for .NET using Reactive Extens ``` Install-Package Octokit.Reactive ``` +### Beta packages ### +Unstable NuGet packages that track the master branch of this repository are available at +[https://ci.appveyor.com/nuget/octokit-net](https://ci.appveyor.com/nuget/octokit-net) In Xamarin Studio you can find this option under the project's context menu: **Add | Add Packages...***. diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 68f95a68..abfd6daa 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,17 +1,30 @@ -### New in 0.17.0 (released TBD) +### New in 0.17.0 (released 2015/12/07) -* Improved: Added ability to create deploy keys that are read only and can only be used to read repository contents and not write to them - via #915 @haacked -* Improved: Added `Content` property to `NewTreeItem` to allow specifying content for a tree - via #915 @haacked -* Improved: Added `Description` property to `NewTeam` to allow specifying a description for a team - via #915 @haacked -* Improved: Added `Description` property to `OrganizationUpdate` to allow specifying a description for an organization - via #915 @haacked -* Improved: Added `Before` property to `NotificationsRequest` to find notifications updated before a specific time - via #915 @haacked -* Improved: Renamed `SignatureResponse` to `Committer` and replaced `CommitEntity` with `Committer` - via @haacked -* Fixed: Bug that prevented sepecifying a commit message for pull request merges - via #915 @haacked +* New: `NewRepositoryWebHook` helper class useful for creating web hooks - #917 via @alfhenrik +* New: Overloads to the `GetArchive` method of `RepositoryContentsClient` that accept a timeout - #918 via @willsb +* Improved: Added `EventsUrl` to `Issue` - #901 via @alfhenrik +* Improved: Added `Committer` and `Author` to the `GitHubCommit` object - #903 via @willsb +* Improved: Made `EncodedContent` property of `RepositoryContent` public - #861 via @naveensrinivasan +* Improved: Added ability to create deploy keys that are read only and can only be used to read repository contents and not write to them - #915 via @haacked +* Improved: Added `Content` property to `NewTreeItem` to allow specifying content for a tree - #915 via @haacked +* Improved: Added `Description` property to `NewTeam` to allow specifying a description for a team - #915 via @haacked +* Improved: Added `Description` property to `OrganizationUpdate` to allow specifying a description for an organization - #915 via @haacked +* Improved: Added `Before` property to `NotificationsRequest` to find notifications updated before a specific time - #915 via @haacked +* Improved: Renamed `SignatureResponse` to `Committer` and replaced `CommitEntity` with `Committer` - #916 via @haacked +* Improved: Added URLs with more information to the `PrivateRepositoryQuotaExceededException` - #929 via @elbaloo +* Improved: The `Merge` method of `PullRequestsClient` now throws more specific exceptions when pull request is not mergeable - #976 via @elbaloo and @shiftkey +* Fixed: Bug that prevented specifying a commit message for pull request merges - #915 via @haacked +* Fixed: Added `System` to required framework assemblies for the `net45` NuGet package - #919 via @adamralph +* Fixed: Change the `HasIssues` property of `NewRepository` to be a nullable boolean because it's optional - #942 via @alfhenrik +* Fixed: Bug that caused downloading release assets to fail because it didn't handle the `application/octet-stream` content type properly - #943 via @naveensrinivasan +* Fixed: JSON serialization bug with unicode characters - #972 via @naveensrinivasan **Breaking Changes:** - `NewDeployment` constructor requires a ref as this is required for the API. It no longer has a default constructor. - `NewDeploymentStatus` constructor requires a `DeploymentState` as this is required for the API. It no longer has a default constructor. - The `Name` property of `NewTeam` is now read only. It is specified via the constructor. + - Renamed `SignatureResponse` to `Committer` and removes `CommitEntity`, replacing it with `Committer`. + - Changed the type of `HasIssues` property of `NewRepository` to be nullable. ### New in 0.16.0 (released 2015/09/17) diff --git a/SolutionInfo.cs b/SolutionInfo.cs index e2fd9c8e..ba2f342f 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -6,10 +6,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyVersionAttribute("0.17.0")] [assembly: AssemblyFileVersionAttribute("0.17.0")] [assembly: ComVisibleAttribute(false)] -namespace System -{ - internal static class AssemblyVersionInformation - { +namespace System { + internal static class AssemblyVersionInformation { internal const string Version = "0.17.0"; } } diff --git a/appveyor.yml b/appveyor.yml index c3086993..68cb0135 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,4 +4,10 @@ build_script: - cmd: build.cmd BuildApp - cmd: build.cmd UnitTests - cmd: build.cmd ConventionTests + - cmd: build.cmd CreatePackages test: off +nuget: + account_feed: true + project_feed: true +artifacts: +- path: '**\octokit*.nupkg' diff --git a/samples/linqpad-samples/6-create-repository.linq b/samples/linqpad-samples/6-create-repository.linq index 2b7c7995..1caa020f 100644 --- a/samples/linqpad-samples/6-create-repository.linq +++ b/samples/linqpad-samples/6-create-repository.linq @@ -71,7 +71,7 @@ async Task Main(string[] args) "Hello World!", createdTree.Sha, new[] { master.Object.Sha }) - { Author = new SignatureResponse(owner,email,DateTime.UtcNow)}; + { Author = new Committer(owner,email,DateTime.UtcNow)}; var createdCommit = await client.GitDatabase.Commit .Create(owner, reponame, newCommit);