diff --git a/Octokit.Tests/Http/ConnectionTests.cs b/Octokit.Tests/Http/ConnectionTests.cs index 3e352839..45e9bfe1 100644 --- a/Octokit.Tests/Http/ConnectionTests.cs +++ b/Octokit.Tests/Http/ConnectionTests.cs @@ -439,7 +439,7 @@ namespace Octokit.Tests.Http httpClient.Received().Send(Arg.Is(req => req.BaseAddress == _exampleUri && req.Body == body && - req.Headers["Accept"] == "application/vnd.github.v3+json; charset=utf-8" && + req.Headers["Accept"] == "application/vnd.github.moondragon+json; charset=utf-8,application/vnd.github.v3+json; charset=utf-8" && req.ContentType == "application/arbitrary" && req.Method == HttpMethod.Post && req.Endpoint == new Uri("https://other.host.com/path?query=val")), Args.CancellationToken); diff --git a/Octokit.Tests/Http/JsonHttpPipelineTests.cs b/Octokit.Tests/Http/JsonHttpPipelineTests.cs index be4b19ea..68dbea2f 100644 --- a/Octokit.Tests/Http/JsonHttpPipelineTests.cs +++ b/Octokit.Tests/Http/JsonHttpPipelineTests.cs @@ -30,7 +30,7 @@ namespace Octokit.Tests.Http jsonPipeline.SerializeRequest(request); Assert.Contains("Accept", request.Headers.Keys); - Assert.Equal("application/vnd.github.v3+json; charset=utf-8", request.Headers["Accept"]); + Assert.Equal("application/vnd.github.moondragon+json; charset=utf-8,application/vnd.github.v3+json; charset=utf-8", request.Headers["Accept"]); } [Fact] diff --git a/Octokit/Http/JsonHttpPipeline.cs b/Octokit/Http/JsonHttpPipeline.cs index 09e059ba..d5af3334 100644 --- a/Octokit/Http/JsonHttpPipeline.cs +++ b/Octokit/Http/JsonHttpPipeline.cs @@ -11,6 +11,9 @@ namespace Octokit.Internal /// public class JsonHttpPipeline { + private const string moondragonPreviewApiVersion = "application/vnd.github.moondragon+json; charset=utf-8"; + private const string v3ApiVersion = "application/vnd.github.v3+json; charset=utf-8"; + readonly IJsonSerializer _serializer; public JsonHttpPipeline() : this(new SimpleJsonSerializer()) @@ -30,7 +33,8 @@ namespace Octokit.Internal if (!request.Headers.ContainsKey("Accept")) { - request.Headers["Accept"] = "application/vnd.github.v3+json; charset=utf-8"; + + request.Headers["Accept"] = String.Join(",", moondragonPreviewApiVersion, v3ApiVersion); } if (request.Method == HttpMethod.Get || request.Body == null) return; diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 30b48f75..281415d1 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,9 +1,17 @@ -### New in 0.6.3 (Released ???/??/??) - -* ... +### New in 0.7.0 (Released 2015/02/24) +* New: Response models now use read-only properties - #658, #662 via @haacked, #663 via @khellang, #679 via @Zoltu +* New: Added `Truncated` property to `TreeResponse` - #674 via @Zoltu +* New: Added `GetRecursive` method to `ITreesClient` - #673 via @Zoltu +* New: Added `Merging` client to `Repository` API: - #603 via @tabro +* New: API internals are now read-only - #662 via @haacked +* Fixed: Commit Status API now supports combined status- #618 via @khellang +* Fixed: Changed `IGistCommentsClient` identifiers to `string` instead of `int` - #681 via @thedillonb +* Fixed: Improved error message when repository creation fails - #667 via @gabrielweyer +* Fixed: Team membership API was incorrect - #695 via @aneville **Breaking Changes** -- Response models are all read only. +- Response models are all read only. It is recommended that you subclass the + model class if you need to contructor responses (e.g. for testing) - `IResponse` is now a `readonly` interface. - `ApiResponse` accepts the strongly typed body as an argument. - `IResponse changed to `IApiResponse`. diff --git a/SolutionInfo.cs b/SolutionInfo.cs index 71834b6a..b343ede3 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -3,11 +3,11 @@ using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyProductAttribute("Octokit")] -[assembly: AssemblyVersionAttribute("0.6.3")] -[assembly: AssemblyFileVersionAttribute("0.6.3")] +[assembly: AssemblyVersionAttribute("0.7.0")] +[assembly: AssemblyFileVersionAttribute("0.7.0")] [assembly: ComVisibleAttribute(false)] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "0.6.3"; + internal const string Version = "0.7.0"; } }