mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 12:26:18 +00:00
bugfix - the State value when searching for issues is case-sensitive
This commit is contained in:
@@ -54,4 +54,16 @@ public class SearchClientTests
|
||||
|
||||
Assert.NotEmpty(repos.Items);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SearchForOpenIssues()
|
||||
{
|
||||
var request = new SearchIssuesRequest("phone");
|
||||
request.Repo = "caliburn-micro/caliburn.micro";
|
||||
request.State = ItemState.Open;
|
||||
|
||||
var repos = await _gitHubClient.Search.SearchIssues(request);
|
||||
|
||||
Assert.NotEmpty(repos.Items);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,11 +73,13 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Isuses that are open (default).
|
||||
/// </summary>
|
||||
[Parameter(Value = "open")]
|
||||
Open,
|
||||
|
||||
/// <summary>
|
||||
/// Isuses that are closed.
|
||||
/// </summary>
|
||||
[Parameter(Value = "closed")]
|
||||
Closed
|
||||
}
|
||||
|
||||
|
||||
@@ -217,9 +217,9 @@ namespace Octokit
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "involves:{0}", Involves));
|
||||
}
|
||||
|
||||
if (State != null)
|
||||
if (State.HasValue)
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "state:{0}", State));
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "state:{0}", State.Value.ToParameter()));
|
||||
}
|
||||
|
||||
if (Labels != null)
|
||||
|
||||
Reference in New Issue
Block a user