From 7d7deff1cc6ecb2ae2c7476d836f8fc809fa95b3 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 16 Feb 2015 09:31:04 +0930 Subject: [PATCH 01/10] version bump --- ReleaseNotes.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 30b48f75..89d4d99a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,4 @@ -### New in 0.6.3 (Released ???/??/??) - -* ... +### New in 0.7.0 (Released 2015/02/19) **Breaking Changes** - Response models are all read only. From 53faa6a68a3b3e8598daf2d4966b6abd4dcf5217 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 19 Feb 2015 15:41:21 -0500 Subject: [PATCH 02/10] add moondragon as an acceptable content-type --- Octokit/Http/JsonHttpPipeline.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Octokit/Http/JsonHttpPipeline.cs b/Octokit/Http/JsonHttpPipeline.cs index 09e059ba..0793b123 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(",", new[]{v3ApiVersion, moondragonPreviewApiVersion}) ; } if (request.Method == HttpMethod.Get || request.Body == null) return; From 491c1707a719a489ce79a0b08aae8b4b77c25994 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 23 Feb 2015 08:57:12 +0930 Subject: [PATCH 03/10] preview API first, yo --- Octokit/Http/JsonHttpPipeline.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Octokit/Http/JsonHttpPipeline.cs b/Octokit/Http/JsonHttpPipeline.cs index 0793b123..d5af3334 100644 --- a/Octokit/Http/JsonHttpPipeline.cs +++ b/Octokit/Http/JsonHttpPipeline.cs @@ -34,7 +34,7 @@ namespace Octokit.Internal if (!request.Headers.ContainsKey("Accept")) { - request.Headers["Accept"] = String.Join(",", new[]{v3ApiVersion, moondragonPreviewApiVersion}) ; + request.Headers["Accept"] = String.Join(",", moondragonPreviewApiVersion, v3ApiVersion); } if (request.Method == HttpMethod.Get || request.Body == null) return; From dae923f4824459b90e3463a9a8a90bed93594d47 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Fri, 20 Feb 2015 07:08:14 +0930 Subject: [PATCH 04/10] tag the packages as pre-release --- SolutionInfo.cs | 6 +++--- build.fsx | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) 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"; } } diff --git a/build.fsx b/build.fsx index 38e289b6..cd7a132e 100644 --- a/build.fsx +++ b/build.fsx @@ -6,6 +6,9 @@ open SourceLink let authors = ["GitHub"] +// TODO: this is a naughty hack +let preRelease = "-alpha2" + // project name and description let projectName = "Octokit" let projectDescription = "An async-based GitHub API client library for .NET" @@ -136,7 +139,7 @@ Target "CreateOctokitPackage" (fun _ -> OutputPath = packagingRoot Summary = projectSummary WorkingDir = packagingDir - Version = releaseNotes.AssemblyVersion + Version = releaseNotes.AssemblyVersion + preRelease ReleaseNotes = toLines releaseNotes.Notes AccessKey = getBuildParamOrDefault "nugetkey" "" Publish = hasBuildParam "nugetkey" }) "octokit.nuspec" @@ -159,10 +162,10 @@ Target "CreateOctokitReactivePackage" (fun _ -> OutputPath = packagingRoot Summary = reactiveProjectSummary WorkingDir = reactivePackagingDir - Version = releaseNotes.AssemblyVersion + Version = releaseNotes.AssemblyVersion + preRelease ReleaseNotes = toLines releaseNotes.Notes Dependencies = - ["Octokit", NormalizeVersion releaseNotes.AssemblyVersion + ["Octokit", NormalizeVersion releaseNotes.AssemblyVersion + preRelease "Rx-Main", GetPackageVersion "./packages/" "Rx-Main"] AccessKey = getBuildParamOrDefault "nugetkey" "" Publish = hasBuildParam "nugetkey" }) "Octokit.Reactive.nuspec" From fbe204c58f92ed5bf6ef24d357de8d5a8bde2ac1 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 19 Feb 2015 16:44:38 -0500 Subject: [PATCH 05/10] fix tests --- Octokit.Tests/Http/ConnectionTests.cs | 2 +- Octokit.Tests/Http/JsonHttpPipelineTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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] From da26948db571105ee52520123b9e49ed63469b97 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 23 Feb 2015 10:36:25 +0930 Subject: [PATCH 06/10] added all the PRs --- ReleaseNotes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 89d4d99a..086403a7 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,4 +1,12 @@ ### New in 0.7.0 (Released 2015/02/19) +* 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 +* 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. From 0e2cea7200163a3665e0ba9bb569cee90fd4b0a7 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 23 Feb 2015 10:38:06 +0930 Subject: [PATCH 07/10] some more words --- ReleaseNotes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 086403a7..dc77ea89 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -9,7 +9,8 @@ * 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 wish to craft custom contructors. - `IResponse` is now a `readonly` interface. - `ApiResponse` accepts the strongly typed body as an argument. - `IResponse changed to `IApiResponse`. From 4da2e17007f89a8991695d3b315ebc663cbd2154 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 23 Feb 2015 10:41:27 +0930 Subject: [PATCH 08/10] and one more PR --- ReleaseNotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index dc77ea89..95d971a3 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -3,6 +3,7 @@ * 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 From 27413ec5fa5895375cf781d33f2b8fe5436c51c4 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Tue, 24 Feb 2015 07:54:21 +0930 Subject: [PATCH 09/10] these are not the hacks you are looking for --- build.fsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build.fsx b/build.fsx index cd7a132e..38e289b6 100644 --- a/build.fsx +++ b/build.fsx @@ -6,9 +6,6 @@ open SourceLink let authors = ["GitHub"] -// TODO: this is a naughty hack -let preRelease = "-alpha2" - // project name and description let projectName = "Octokit" let projectDescription = "An async-based GitHub API client library for .NET" @@ -139,7 +136,7 @@ Target "CreateOctokitPackage" (fun _ -> OutputPath = packagingRoot Summary = projectSummary WorkingDir = packagingDir - Version = releaseNotes.AssemblyVersion + preRelease + Version = releaseNotes.AssemblyVersion ReleaseNotes = toLines releaseNotes.Notes AccessKey = getBuildParamOrDefault "nugetkey" "" Publish = hasBuildParam "nugetkey" }) "octokit.nuspec" @@ -162,10 +159,10 @@ Target "CreateOctokitReactivePackage" (fun _ -> OutputPath = packagingRoot Summary = reactiveProjectSummary WorkingDir = reactivePackagingDir - Version = releaseNotes.AssemblyVersion + preRelease + Version = releaseNotes.AssemblyVersion ReleaseNotes = toLines releaseNotes.Notes Dependencies = - ["Octokit", NormalizeVersion releaseNotes.AssemblyVersion + preRelease + ["Octokit", NormalizeVersion releaseNotes.AssemblyVersion "Rx-Main", GetPackageVersion "./packages/" "Rx-Main"] AccessKey = getBuildParamOrDefault "nugetkey" "" Publish = hasBuildParam "nugetkey" }) "Octokit.Reactive.nuspec" From 774b6b0928ed488a2bd628d68848906af2333d0d Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Tue, 24 Feb 2015 07:55:22 +0930 Subject: [PATCH 10/10] tweak release notes --- ReleaseNotes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 95d971a3..281415d1 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,4 +1,4 @@ -### New in 0.7.0 (Released 2015/02/19) +### 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 @@ -11,7 +11,7 @@ **Breaking Changes** - Response models are all read only. It is recommended that you subclass the - model class if you wish to craft custom contructors. + 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`.