Skip to content

Commit

Permalink
Merge branch 'master' into code-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey authored Sep 12, 2019
2 parents 968b56c + 1f01b22 commit 0197c43
Show file tree
Hide file tree
Showing 89 changed files with 2,756 additions and 296 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ before_script:

script:
- git fetch --unshallow --tags
- ./build.sh --linksources=true --verbosity=verbose
# disengage core only switch because mono ships .NETFramework targets
- ./build.sh --coreonly=false --linksources=true --verbosity=verbose
6 changes: 4 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
mode: ContinuousDeployment
branches:
master:
mode: ContinuousDeployment
increment: Minor
tag: beta
dotnetcore:
develop:
mode: ContinuousDeployment
increment: Minor
tag: alpha
source-branches: ['dotnetcore']
ignore:
sha: []
sha: []
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ public interface IObservableCommitCommentReactionsClient
/// <returns></returns>
IObservable<Reaction> GetAll(string owner, string name, int number);

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options);

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
Expand All @@ -49,5 +60,15 @@ public interface IObservableCommitCommentReactionsClient
/// <param name="number">The comment id</param>
/// <returns></returns>
IObservable<Reaction> GetAll(long repositoryId, int number);

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
/// <param name="repositoryId">The owner of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options);
}
}
19 changes: 19 additions & 0 deletions Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,31 @@ public interface IObservableIssueCommentReactionsClient
/// <param name="number">The comment id</param>
IObservable<Reaction> GetAll(string owner, string name, int number);

/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options);

/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment id</param>
IObservable<Reaction> GetAll(long repositoryId, int number);

/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options);
}
}
19 changes: 19 additions & 0 deletions Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public interface IObservableIssueReactionsClient
/// <param name="number">The issue id</param>
IObservable<Reaction> GetAll(string owner, string name, int number);

/// <summary>
/// List reactions for a specified Issue.
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options);

/// <summary>
/// List reactions for a specified Issue.
/// </summary>
Expand All @@ -27,6 +37,15 @@ public interface IObservableIssueReactionsClient
/// <param name="number">The issue id</param>
IObservable<Reaction> GetAll(long repositoryId, int number);

/// <summary>
/// List reactions for a specified Issue.
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The issue id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options);

/// <summary>
/// Creates a reaction for a specified Issue.
/// </summary>
Expand Down
15 changes: 14 additions & 1 deletion Octokit.Reactive/Clients/IObservableMigrationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,22 @@ IObservable<Migration> Start(
/// </remarks>
/// <param name="org">The organization of which to list migrations.</param>
/// <returns>List of most recent <see cref="Migration"/>s.</returns>
IObservable<List<Migration>> GetAll(
IObservable<Migration> GetAll(
string org);

/// <summary>
/// Gets the list of the most recent migrations of the the organization.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/migration/migrations/#get-a-list-of-migrations
/// </remarks>
/// <param name="org">The organization of which to list migrations.</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>List of most recent <see cref="Migration"/>s.</returns>
IObservable<Migration> GetAll(
string org,
ApiOptions options);

/// <summary>
/// Get the status of a migration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public interface IObservablePullRequestReviewCommentReactionsClient
/// <param name="number">The comment id</param>
IObservable<Reaction> GetAll(string owner, string name, int number);

/// <summary>
/// Get all reactions for a specified Pull Request Review Comment.
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options);

/// <summary>
/// Get all reactions for a specified Pull Request Review Comment.
/// </summary>
Expand All @@ -27,6 +37,15 @@ public interface IObservablePullRequestReviewCommentReactionsClient
/// <param name="number">The comment id</param>
IObservable<Reaction> GetAll(long repositoryId, int number);

/// <summary>
/// Get all reactions for a specified Pull Request Review Comment.
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options);

/// <summary>
/// Creates a reaction for a specified Pull Request Review Comment.
/// </summary>
Expand Down
34 changes: 32 additions & 2 deletions Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,26 @@ public IObservable<Reaction> Create(long repositoryId, int number, NewReaction r
/// <param name="number">The comment id</param>
/// <returns></returns>
public IObservable<Reaction> GetAll(string owner, string name, int number)
{
return GetAll(owner, name, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
}

/// <summary>
Expand All @@ -81,7 +96,22 @@ public IObservable<Reaction> GetAll(string owner, string name, int number)
/// <returns></returns>
public IObservable<Reaction> GetAll(long repositoryId, int number)
{
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
return GetAll(repositoryId, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Commit Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
/// <param name="repositoryId">The owner of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
}
}
}
35 changes: 33 additions & 2 deletions Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,24 @@ public IObservable<Reaction> GetAll(string owner, string name, int number)
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
return GetAll(owner, name, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
}

/// <summary>
Expand All @@ -77,7 +94,21 @@ public IObservable<Reaction> GetAll(string owner, string name, int number)
/// <param name="number">The comment id</param>
public IObservable<Reaction> GetAll(long repositoryId, int number)
{
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
return GetAll(repositoryId, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="options">Options for changing the API response</param>
public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
}
}
}
32 changes: 30 additions & 2 deletions Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,25 @@ public ObservableIssueReactionsClient(IGitHubClient client)
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue id</param>
public IObservable<Reaction> GetAll(string owner, string name, int number)
{
return GetAll(owner, name, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Issue
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue id</param>
/// <param name="options">Options for changing the API response</param>
public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
}

/// <summary>
Expand All @@ -46,7 +60,21 @@ public IObservable<Reaction> GetAll(string owner, string name, int number)
/// <param name="number">The issue id</param>
public IObservable<Reaction> GetAll(long repositoryId, int number)
{
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
return GetAll(repositoryId, number, ApiOptions.None);
}

/// <summary>
/// List reactions for a specified Issue.
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The issue id</param>
/// <param name="options">Options for changing the API response</param>
public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
}

/// <summary>
Expand Down
14 changes: 12 additions & 2 deletions Octokit.Reactive/Clients/ObservableMigrationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Reactive;
using System.Reactive.Threading.Tasks;
using Octokit.Reactive.Internal;

namespace Octokit.Reactive
{
Expand All @@ -15,6 +16,7 @@ namespace Octokit.Reactive
public class ObservableMigrationsClient : IObservableMigrationsClient
{
private readonly IMigrationsClient _client;
private readonly IConnection _connection;

/// <summary>
/// Instantiates a GitHub Migrations API client.
Expand All @@ -25,6 +27,7 @@ public ObservableMigrationsClient(IGitHubClient client)
Ensure.ArgumentNotNull(client, nameof(client));

_client = client.Migration.Migrations;
_connection = client.Connection;
}

/// <summary>
Expand All @@ -50,9 +53,16 @@ public IObservable<Migration> Start(string org, StartMigrationRequest migration)
/// </remarks>
/// <param name="org">The organization of which to list migrations.</param>
/// <returns>List of most recent <see cref="Migration"/>s.</returns>
public IObservable<List<Migration>> GetAll(string org)
public IObservable<Migration> GetAll(string org)
{
return _client.GetAll(org).ToObservable();
return GetAll(org, ApiOptions.None);
}

public IObservable<Migration> GetAll(string org, ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Migration>(ApiUrls.EnterpriseMigrations(org), null, AcceptHeaders.MigrationsApiPreview, options);
}

/// <summary>
Expand Down
Loading

0 comments on commit 0197c43

Please sign in to comment.