mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
@@ -38,8 +38,7 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\Octokit.ruleset</CodeAnalysisRuleSet>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DocumentationFile>bin\Release\Net45\Octokit.Reactive.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -54,14 +54,14 @@ namespace Octokit
|
||||
/// The date and time at which the current rate limit window resets
|
||||
/// </summary>
|
||||
[Parameter(Key = "ignoreThisField")]
|
||||
public DateTimeOffset Reset { get; private set; }
|
||||
public DateTimeOffset Reset { get { return ResetAsUtcEpochSeconds.FromUnixTime(); } }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time at which the current rate limit window resets - in UTC epoch seconds
|
||||
/// </summary>
|
||||
[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<string, string> 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
|
||||
|
||||
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// The previous filename for a renamed file.
|
||||
/// </summary>
|
||||
[Parameter(Key = "previous_filename")]
|
||||
public string PreviousFileName { get; protected set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<DocumentationFile>bin\Release\Mono\Octokit.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\Octokit.ruleset</CodeAnalysisRuleSet>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DocumentationFile>bin\Release\Portable\Octokit.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SolutionInfo.cs">
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\Octokit.ruleset</CodeAnalysisRuleSet>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DocumentationFile>bin\Release\NetCore45\Octokit.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SolutionInfo.cs">
|
||||
|
||||
@@ -40,8 +40,7 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\Octokit.ruleset</CodeAnalysisRuleSet>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DocumentationFile>bin\Release\Net45\Octokit.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-6
@@ -1,14 +1,13 @@
|
||||
// <auto-generated/>
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user