Skip to content

Commit

Permalink
Release v0.24 - A Sight For Sore Eyes (#1539)
Browse files Browse the repository at this point in the history
* Add release notes and bump version to 0.24

* run "build FormatCode" to fix up whitespace/formatting issues

* Fix failing Ssh key tests due to "validation exception".  This key must be in use on github (under another user, most likely from these tests failing).  Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed

* Assignee and Assignees cant both be specified on NewIssue.  We missed this one in the PR.  Marked Assignee as [Obsolete] and fixed tests to use Assignees

* Fix a couple of Reactions tests that were calling the wrong client methods

* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)

* Fix some following tests that require the test user to follow more than 1 other user

* Unskip these Event tests now because apparently they work!

* add breaking changes notes

* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)

* return null if ApiError.Message is empty or whitespace

* Uncomment test, which now passes

* update release notes to include PR1540

* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)

* Update to include PR1541

* add bullets to make release notes easier to read

* markup additional code mentions in notes

* Fix grammar

fields => field
  • Loading branch information
ryangribble committed Jan 17, 2017
1 parent aa80eaa commit 3c81893
Show file tree
Hide file tree
Showing 133 changed files with 431 additions and 413 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface IObservableCommitCommentReactionsClient
/// <param name="number">The comment id</param>
/// <returns></returns>
IObservable<Reaction> GetAll(string owner, string name, int number);

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableCommitStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IObservableCommitStatusClient
/// <param name="name">The name of the repository</param>
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
IObservable<CommitStatus> GetAll(string owner, string name, string reference);

/// <summary>
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
/// a tag name.
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableCommitsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface IObservableCommitsClient
/// <param name="name">The name of the repository</param>
/// <param name="commit">The commit to create</param>
IObservable<Commit> Create(string owner, string name, NewCommit commit);

/// <summary>
/// Create a commit for a given repository
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableDeploymentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IObservableDeploymentsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
IObservable<Deployment> GetAll(string owner, string name);

/// <summary>
/// Gets all the deployments for the specified repository. Any user with pull access
/// to a repository can view deployments.
Expand All @@ -43,7 +43,7 @@ public interface IObservableDeploymentsClient
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Deployment> GetAll(string owner, string name, ApiOptions options);

/// <summary>
/// Gets all the deployments for the specified repository. Any user with pull access
/// to a repository can view deployments.
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableIssueTimelineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public interface IObservableIssueTimelineClient
/// <param name="number">The issue number</param>
/// <param name="options">Options for changing the API response</param>
IObservable<TimelineEventInfo> GetAllForIssue(string owner, string repo, int number, ApiOptions options);

/// <summary>
/// Gets all the various events that have occurred around an issue or pull request.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IObservableIssuesEventsClient
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue number</param>
IObservable<EventInfo> GetAllForIssue(string owner, string name, int number);

/// <summary>
/// Gets all events for the issue.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableMilestonesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IObservableMilestonesClient
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<Milestone> Get(string owner, string name, int number);

/// <summary>
/// Gets a single Milestone by number.
/// </summary>
Expand All @@ -44,7 +44,7 @@ public interface IObservableMilestonesClient
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<Milestone> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets all open milestones for the repository.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableOrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public interface IObservableOrganizationsClient
/// <param name="user">The login for the user</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
IObservable<Organization> GetAll(string user, ApiOptions options);

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableReferencesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IObservableReferencesClient
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<Reference> Get(string owner, string name, string reference);

/// <summary>
/// Gets a reference for a given repository by reference name
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableReleasesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public interface IObservableReleasesClient
/// <param name="data">Description of the asset with its data</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
IObservable<ReleaseAsset> UploadAsset(Release release, ReleaseAssetUpload data);

/// <summary>
/// Gets the specified <see cref="ReleaseAsset"/> for the specified release of the specified repository.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IObservableRepositoryContentsClient
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
IObservable<string> GetReadmeHtml(long repositoryId);

/// <summary>
/// Get an archive of a given repository's contents
/// </summary>
Expand Down Expand Up @@ -167,7 +167,7 @@ public interface IObservableRepositoryContentsClient
/// <param name="reference">The name of the commit/branch/tag. Default: the repository’s default branch (usually master)</param>
/// <param name="path">The content path</param>
IObservable<RepositoryContent> GetAllContentsByRef(long repositoryId, string reference, string path);

/// <summary>
/// Returns the contents of the home directory in a repository.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface IObservableRepositoryHooksClient
/// <param name="options">Options for changing the API response</param>
/// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#list">API documentation</a> for more information.</remarks>
IObservable<RepositoryHook> GetAll(string owner, string name, ApiOptions options);

/// <summary>
/// Gets the list of hooks defined for a repository
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/IObservableStarredClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface IObservableStarredClient
/// <param name="options">Options for changing the API response</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<User> GetAllStargazers(string owner, string name, ApiOptions options);

/// <summary>
/// Retrieves all of the stargazers for the passed repository
/// </summary>
Expand All @@ -49,7 +49,7 @@ public interface IObservableStarredClient
/// <param name="name">The name of the repository</param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<UserStar> GetAllStargazersWithTimestamps(string owner, string name);

/// <summary>
/// Retrieves all of the stargazers for the passed repository with star creation timestamps.
/// </summary>
Expand Down Expand Up @@ -79,7 +79,7 @@ public interface IObservableStarredClient
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
IObservable<Repository> GetAllForCurrent();

/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
/// </summary>
Expand All @@ -91,7 +91,7 @@ public interface IObservableStarredClient
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
IObservable<RepositoryStar> GetAllForCurrentWithTimestamps();

/// <summary>
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user with star creation timestamps.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/ObservableCommitStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public IObservable<CommitStatus> GetAll(string owner, string name, string refere
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");

return GetAll(owner, name ,reference, ApiOptions.None);
return GetAll(owner, name, reference, ApiOptions.None);
}

/// <summary>
Expand Down Expand Up @@ -68,7 +68,7 @@ public IObservable<CommitStatus> GetAll(string owner, string name, string refere
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
Ensure.ArgumentNotNull(options, "options");
Ensure.ArgumentNotNull(options, "options");

return _connection.GetAndFlattenAllPages<CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference), options);
}
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public IObservable<Activity> GetAllForAnOrganization(string user, string organiz
Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
Ensure.ArgumentNotNull(options, "options");

return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.OrganizationEvents(user, organization),options);
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.OrganizationEvents(user, organization), options);
}
}
}
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public IObservable<GistComment> Get(string gistId, int commentId)
/// <returns>IObservable{GistComment}.</returns>
public IObservable<GistComment> GetAllForGist(string gistId)
{
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");

return GetAllForGist(gistId, ApiOptions.None);
}
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/ObservableGistsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public IObservable<Gist> GetAll(ApiOptions options)
/// </remarks>
/// <param name="since">Only gists updated at or after this time are returned</param>
public IObservable<Gist> GetAll(DateTimeOffset since)
{
{
return GetAll(since, ApiOptions.None);
}

Expand Down Expand Up @@ -179,7 +179,7 @@ public IObservable<Gist> GetAllPublic(DateTimeOffset since)
/// <param name="options">Options for changing the API response</param>
public IObservable<Gist> GetAllPublic(DateTimeOffset since, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
Ensure.ArgumentNotNull(options, "options");

var request = new GistRequest(since);
return _connection.GetAndFlattenAllPages<Gist>(ApiUrls.PublicGists(), request.ToParametersDictionary(), options);
Expand Down
10 changes: 5 additions & 5 deletions Octokit.Reactive/Clients/ObservableOrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ public IObservable<Organization> GetAll(string user, ApiOptions options)
/// <returns></returns>
public IObservable<Organization> GetAllForUser(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
Ensure.ArgumentNotNullOrEmptyString(user, "user");

return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user));
return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user));
}

/// <summary>
Expand All @@ -115,10 +115,10 @@ public IObservable<Organization> GetAllForUser(string user)
/// <returns></returns>
public IObservable<Organization> GetAllForUser(string user, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
Ensure.ArgumentNotNull(options, "options");
Ensure.ArgumentNotNullOrEmptyString(user, "user");
Ensure.ArgumentNotNull(options, "options");

return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user), options);
return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user), options);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ObservableRepositoryCommentsClient : IObservableRepositoryCommentsC
{
readonly IRepositoryCommentsClient _client;
readonly IConnection _connection;

public ObservableRepositoryCommentsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ObservableRepositoryHooksClient : IObservableRepositoryHooksClient
{
readonly IRepositoryHooksClient _client;
readonly IConnection _connection;

public ObservableRepositoryHooksClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Tests.Conventions/ClientConstructorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void CheckTestConstructorNames(Type type)
const string constructorTestMethodName = "EnsuresNonNullArguments";

var classes = new HashSet<string>(type.GetNestedTypes().Select(t => t.Name));

if (!classes.Contains(constructorTestClassName))
{
throw new MissingClientConstructorTestClassException(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Octokit.Tests.Conventions
public class ApiOptionsMissingException : Exception
{
public ApiOptionsMissingException(Type type, IEnumerable<MethodInfo> methods)
: base(CreateMessage(type, methods)) { }
: base(CreateMessage(type, methods))
{ }

static string CreateMessage(Type type, IEnumerable<MethodInfo> methods)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task CanCreatePersonalToken()
public async Task CanGetAuthorization()
{
var github = Helper.GetBasicAuthClient();

var authorizations = await github.Authorization.GetAll();
Assert.NotEmpty(authorizations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public async Task ReturnsCorrectCountOfDeploymentStatusesWithStartWithRepository
var newStatus1 = new NewDeploymentStatus(DeploymentState.Success);
var newStatus2 = new NewDeploymentStatus(DeploymentState.Success);
var newStatus3 = new NewDeploymentStatus(DeploymentState.Success);
await _deploymentsClient.Status.Create(_context.Repository.Id,_deployment.Id, newStatus1);
await _deploymentsClient.Status.Create(_context.Repository.Id, _deployment.Id, newStatus1);
await _deploymentsClient.Status.Create(_context.Repository.Id, _deployment.Id, newStatus2);
await _deploymentsClient.Status.Create(_context.Repository.Id, _deployment.Id, newStatus3);

Expand Down
20 changes: 10 additions & 10 deletions Octokit.Tests.Integration/Clients/EventsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task ReturnsCorrectCountOfEventsWithStartWithRepositoryId()
public async Task ReturnsDistinctEventsBasedOnStartPage()
{
var github = Helper.GetAuthenticatedClient();

var startOptions = new ApiOptions
{
PageSize = 1,
Expand All @@ -134,7 +134,7 @@ public async Task ReturnsDistinctEventsBasedOnStartPage()
public async Task ReturnsDistinctEventsBasedOnStartPageWithRepositoryId()
{
var github = Helper.GetAuthenticatedClient();

var startOptions = new ApiOptions
{
PageSize = 1,
Expand All @@ -158,7 +158,7 @@ public async Task ReturnsDistinctEventsBasedOnStartPageWithRepositoryId()

public class TheGetAllIssuesForRepositoryMethod
{
[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task CanListIssues()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -167,7 +167,7 @@ public async Task CanListIssues()
Assert.NotEmpty(issues);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task CanListIssuesWithRepositoryId()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -176,7 +176,7 @@ public async Task CanListIssuesWithRepositoryId()
Assert.NotEmpty(issues);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfEventsWithoutStart()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -192,7 +192,7 @@ public async Task ReturnsCorrectCountOfEventsWithoutStart()
Assert.Equal(3, eventInfos.Count);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfEventsWithoutStartWitRepositoryId()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -208,7 +208,7 @@ public async Task ReturnsCorrectCountOfEventsWithoutStartWitRepositoryId()
Assert.Equal(3, eventInfos.Count);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfEventsWithStart()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -225,7 +225,7 @@ public async Task ReturnsCorrectCountOfEventsWithStart()
Assert.Equal(2, eventInfos.Count);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfEventsWithStartWithRepositoryId()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -242,7 +242,7 @@ public async Task ReturnsCorrectCountOfEventsWithStartWithRepositoryId()
Assert.Equal(2, eventInfos.Count);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsDistinctEventsBasedOnStartPage()
{
var github = Helper.GetAuthenticatedClient();
Expand All @@ -267,7 +267,7 @@ public async Task ReturnsDistinctEventsBasedOnStartPage()
Assert.NotEqual(firstPage[0].Id, secondPage[0].Id);
}

[IntegrationTest(Skip = "Fails because of SimpleJsonSerializer, see https://github.com/octokit/octokit.net/issues/1374 for details.")]
[IntegrationTest]
public async Task ReturnsDistinctEventsBasedOnStartPageWithRepositoryId()
{
var github = Helper.GetAuthenticatedClient();
Expand Down

0 comments on commit 3c81893

Please sign in to comment.