From ffa8421b35ee57e72dc3d7c16e30d7ef8b52ceda Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 10 Sep 2015 14:17:33 +0930 Subject: [PATCH 1/5] version bump --- SolutionInfo.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SolutionInfo.cs b/SolutionInfo.cs index 0036ee62..3e9a7a84 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -1,14 +1,13 @@ // - using System.Reflection; using System.Runtime.InteropServices; -[assembly: AssemblyProduct("Octokit")] -[assembly: AssemblyVersion("0.14.0")] -[assembly: AssemblyFileVersion("0.14.0")] -[assembly: ComVisible(false)] +[assembly: AssemblyProductAttribute("Octokit")] +[assembly: AssemblyVersionAttribute("0.15.0")] +[assembly: AssemblyFileVersionAttribute("0.15.0")] +[assembly: ComVisibleAttribute(false)] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "0.14.0"; + internal const string Version = "0.15.0"; } } From 23735d61e2f636cd566caa0cb370a80ef26caa8d Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 10 Sep 2015 14:17:45 +0930 Subject: [PATCH 2/5] bugfix: setter removed --- Octokit/Http/RateLimit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Octokit/Http/RateLimit.cs b/Octokit/Http/RateLimit.cs index 48d9d482..e44a8727 100644 --- a/Octokit/Http/RateLimit.cs +++ b/Octokit/Http/RateLimit.cs @@ -110,7 +110,7 @@ namespace Octokit { Limit = this.Limit, Remaining = this.Remaining, - ResetAsUtcEpochSeconds = this.ResetAsUtcEpochSeconds + Reset = this.Reset }; } From c5373272eddd64469f4af326bf29f12e2ddb4cf9 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 10 Sep 2015 14:51:29 +0930 Subject: [PATCH 3/5] added release notes --- ReleaseNotes.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 6521128f..732ce389 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,25 @@ +### New in 0.15.0 (released 2015/09/11) +* New: `IRepositoryContentsClient.GetAllContents` now has an overload to support specifying a reference - #730 via @goalie7960 +* New: Support for retrieving rate limit information from `IMiscellaneousClient` - #848 via @Red-Folder +* New: Use `GitHubClient.GetLastApiInfo()` to get API information for previous request - #855 via @Red-Folder, @khellang +* New: `PreviousFileName` returned to show renamed files in commit - #871 via @CorinaCiocanea +* Improved: `CommentUrl` returned on `Issue` response - #884 via @naveensrinivasan +* Improved: Issue and Code Search now accepts multiple repositories - #835 via @shiftkey +* Improved: Search now accepts a range of dates - #857 via @ChrisMissal +* Improved: Documentation on `Issue` response - #876 via @Eilon +* Improved: Code Search now accepts `FileName` parameter - #864 via @fffej +* Fixed: `GetQueuedContent` should return empty response for `204 No Content`, instead of throwing - #862 via @haacked +* Fixed: `TeamClient.AddMembership` sends correct parameter to server - #856 via @davidalpert +* Obsolete: `Authorization` endpoint which does not require fingerprint - #878 via @niik + +**Breaking Changes:** + - #835 has changed the `Repos` property for `SearchIssuesRequest` and `SearchCodeRequest` + are now of type `RepositoryCollection` so that multiple repositories can be searched. + - The workarounds removed in #878 were added initially to support transitioning, but now + we enforce the use of a fingerprint. See https://developer.github.com/v3/oauth_authorizations/ + for more details. + + ### New in 0.14.0 (released 2015/07/21) * New: Repository redirects are supported natively - #808 via @darrelmiller, @shiftkey * Fixed: Support for searching repositories without a search term - #828 via @alexandrugyori From 87d24f5fa74cb3ae76488c5c698d0c15301802ed Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 10 Sep 2015 15:38:00 +0930 Subject: [PATCH 4/5] fixed impacted tests --- .../Clients/SearchClientTests.cs | 5 +++-- Octokit/Http/RateLimit.cs | 14 +++++++------- Octokit/Models/Response/GitHubCommitFile.cs | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/SearchClientTests.cs b/Octokit.Tests.Integration/Clients/SearchClientTests.cs index c4f6042d..3f4600e0 100644 --- a/Octokit.Tests.Integration/Clients/SearchClientTests.cs +++ b/Octokit.Tests.Integration/Clients/SearchClientTests.cs @@ -46,9 +46,10 @@ public class SearchClientTests [Fact] public async Task SearchForFileNameInCode() { - var request = new SearchCodeRequest("swag") + var request = new SearchCodeRequest("GitHub") { - FileName = "readme.md" + FileName = "readme.md", + Repos = new RepositoryCollection { "octokit/octokit.net" } }; var repos = await _gitHubClient.Search.SearchCode(request); diff --git a/Octokit/Http/RateLimit.cs b/Octokit/Http/RateLimit.cs index e44a8727..d2e93eda 100644 --- a/Octokit/Http/RateLimit.cs +++ b/Octokit/Http/RateLimit.cs @@ -26,7 +26,7 @@ namespace Octokit Limit = (int) GetHeaderValueAsInt32Safe(responseHeaders, "X-RateLimit-Limit"); Remaining = (int) GetHeaderValueAsInt32Safe(responseHeaders, "X-RateLimit-Remaining"); - Reset = GetHeaderValueAsInt32Safe(responseHeaders, "X-RateLimit-Reset").FromUnixTime(); + ResetAsUtcEpochSeconds = GetHeaderValueAsInt32Safe(responseHeaders, "X-RateLimit-Reset"); } public RateLimit(int limit, int remaining, long reset) @@ -37,7 +37,7 @@ namespace Octokit Limit = limit; Remaining = remaining; - Reset = reset.FromUnixTime(); + ResetAsUtcEpochSeconds = reset; } /// @@ -54,14 +54,14 @@ namespace Octokit /// The date and time at which the current rate limit window resets /// [Parameter(Key = "ignoreThisField")] - public DateTimeOffset Reset { get; private set; } + public DateTimeOffset Reset { get { return ResetAsUtcEpochSeconds.FromUnixTime(); } } /// /// The date and time at which the current rate limit window resets - in UTC epoch seconds /// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [Parameter(Key = "reset")] - public long ResetAsUtcEpochSeconds { get { return Reset.ToUnixTime(); } } + public long ResetAsUtcEpochSeconds { get; private set; } static long GetHeaderValueAsInt32Safe(IDictionary responseHeaders, string key) { @@ -79,7 +79,7 @@ namespace Octokit Limit = info.GetInt32("Limit"); Remaining = info.GetInt32("Remaining"); - Reset = new DateTimeOffset(info.GetInt64("Reset"), TimeSpan.Zero); + ResetAsUtcEpochSeconds = info.GetInt64("ResetAsUtcEpochSeconds"); } public virtual void GetObjectData(SerializationInfo info, StreamingContext context) @@ -88,7 +88,7 @@ namespace Octokit info.AddValue("Limit", Limit); info.AddValue("Remaining", Remaining); - info.AddValue("Reset", Reset.Ticks); + info.AddValue("ResetAsUtcEpochSeconds", ResetAsUtcEpochSeconds); } #endif @@ -110,7 +110,7 @@ namespace Octokit { Limit = this.Limit, Remaining = this.Remaining, - Reset = this.Reset + ResetAsUtcEpochSeconds = this.ResetAsUtcEpochSeconds }; } diff --git a/Octokit/Models/Response/GitHubCommitFile.cs b/Octokit/Models/Response/GitHubCommitFile.cs index 65bde71e..e29f4db9 100644 --- a/Octokit/Models/Response/GitHubCommitFile.cs +++ b/Octokit/Models/Response/GitHubCommitFile.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using Octokit.Internal; namespace Octokit { @@ -83,6 +84,7 @@ namespace Octokit /// /// The previous filename for a renamed file. /// + [Parameter(Key = "previous_filename")] public string PreviousFileName { get; protected set; } internal string DebuggerDisplay From 6ea7ad3ccb7d327c1d4e05d6cbb240af4939baff Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 10 Sep 2015 16:07:04 +0930 Subject: [PATCH 5/5] re-enabled docs generation --- Octokit.Reactive/Octokit.Reactive.csproj | 3 +-- Octokit/Octokit-Mono.csproj | 1 + Octokit/Octokit-Portable.csproj | 3 +-- Octokit/Octokit-netcore45.csproj | 3 +-- Octokit/Octokit.csproj | 3 +-- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index 90f90d78..89a6dc7c 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -38,8 +38,7 @@ false true ..\Octokit.ruleset - - + bin\Release\Net45\Octokit.Reactive.XML diff --git a/Octokit/Octokit-Mono.csproj b/Octokit/Octokit-Mono.csproj index 77417e73..e7f218f5 100644 --- a/Octokit/Octokit-Mono.csproj +++ b/Octokit/Octokit-Mono.csproj @@ -32,6 +32,7 @@ prompt 4 false + bin\Release\Mono\Octokit.XML diff --git a/Octokit/Octokit-Portable.csproj b/Octokit/Octokit-Portable.csproj index 7e822d07..4e487ca9 100644 --- a/Octokit/Octokit-Portable.csproj +++ b/Octokit/Octokit-Portable.csproj @@ -37,8 +37,7 @@ 4 false ..\Octokit.ruleset - - + bin\Release\Portable\Octokit.XML diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index 862c55a4..2702f109 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -41,8 +41,7 @@ 4 true ..\Octokit.ruleset - - + bin\Release\NetCore45\Octokit.XML diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index b5c513c6..17e33a4b 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -40,8 +40,7 @@ false true ..\Octokit.ruleset - - + bin\Release\Net45\Octokit.XML