Skip to content

Commit

Permalink
Merge pull request #771 from alfhenrik/getall-methodname
Browse files Browse the repository at this point in the history
Add convention test to ensure pagination methods meet naming conventions
  • Loading branch information
shiftkey committed Apr 6, 2015
2 parents 9bf22e9 + 189ae42 commit 40abcb7
Show file tree
Hide file tree
Showing 105 changed files with 371 additions and 321 deletions.
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableAssigneesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IObservableAssigneesClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<User> GetForRepository(string owner, string name);
IObservable<User> GetAllForRepository(string owner, string name);

/// <summary>
/// Checks to see if a user is an assignee for a repository.
Expand Down
10 changes: 5 additions & 5 deletions Octokit.Reactive/Clients/IObservableEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public interface IObservableEventsClient
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has received.</returns>
IObservable<Activity> GetUserReceived(string user);
IObservable<Activity> GetAllUserReceived(string user);

/// <summary>
/// Gets all the events that have been received by a given user.
Expand All @@ -64,7 +64,7 @@ public interface IObservableEventsClient
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has received.</returns>
IObservable<Activity> GetUserReceivedPublic(string user);
IObservable<Activity> GetAllUserReceivedPublic(string user);

/// <summary>
/// Gets all the events that have been performed by a given user.
Expand All @@ -74,7 +74,7 @@ public interface IObservableEventsClient
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has performed.</returns>
IObservable<Activity> GetUserPerformed(string user);
IObservable<Activity> GetAllUserPerformed(string user);

/// <summary>
/// Gets all the public events that have been performed by a given user.
Expand All @@ -84,7 +84,7 @@ public interface IObservableEventsClient
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the public <see cref="Activity"/>s that a particular user has performed.</returns>
IObservable<Activity> GetUserPerformedPublic(string user);
IObservable<Activity> GetAllUserPerformedPublic(string user);

/// <summary>
/// Gets all the events that are associated with an organization.
Expand All @@ -95,6 +95,6 @@ public interface IObservableEventsClient
/// <param name="user">The login of the user</param>
/// <param name="organization">The name of the organization</param>
/// <returns>All the public <see cref="Activity"/>s that are associated with an organization.</returns>
IObservable<Activity> GetForAnOrganization(string user, string organization);
IObservable<Activity> GetAllForAnOrganization(string user, string organization);
}
}
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/IObservableGistCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface IObservableGistCommentsClient
/// <remarks>http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist</remarks>
/// <param name="gistId">The id of the gist</param>
/// <returns>IObservable{GistComment}.</returns>
IObservable<GistComment> GetForGist(string gistId);
IObservable<GistComment> GetAllForGist(string gistId);

/// <summary>
/// Creates a comment for the gist with the specified id.
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IObservableIssueCommentsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns>The list of <see cref="IssueComment"/>s for the specified Repository.</returns>
IObservable<IssueComment> GetForRepository(string owner, string name);
IObservable<IssueComment> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets Issue Comments for a specified Issue.
Expand All @@ -35,7 +35,7 @@ public interface IObservableIssueCommentsClient
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue number</param>
/// <returns>The list of <see cref="IssueComment"/>s for the specified Issue.</returns>
IObservable<IssueComment> GetForIssue(string owner, string name, int number);
IObservable<IssueComment> GetAllForIssue(string owner, string name, int number);

/// <summary>
/// Creates a new Issue Comment for a specified Issue.
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableIssuesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public interface IObservableIssuesClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<Issue> GetForRepository(string owner, string name);
IObservable<Issue> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets issues for a repository.
Expand All @@ -131,7 +131,7 @@ public interface IObservableIssuesClient
/// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter and sort the list of issues returned</param>
/// <returns></returns>
IObservable<Issue> GetForRepository(string owner, string name, RepositoryIssueRequest request);
IObservable<Issue> GetAllForRepository(string owner, string name, RepositoryIssueRequest request);

/// <summary>
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IObservableIssuesEventsClient
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue number</param>
/// <returns></returns>
IObservable<EventInfo> GetForIssue(string owner, string name, int number);
IObservable<EventInfo> GetAllForIssue(string owner, string name, int number);

/// <summary>
/// Gets all events for the repository.
Expand All @@ -26,7 +26,7 @@ public interface IObservableIssuesEventsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<IssueEvent> GetForRepository(string owner, string name);
IObservable<IssueEvent> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets a single event
Expand Down
6 changes: 3 additions & 3 deletions Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IObservableIssuesLabelsClient
/// <param name="repo">The name of the repository</param>
/// <param name="number">The number of the issue</param>
/// <returns>The list of labels</returns>
IObservable<Label> GetForIssue(string owner, string repo, int number);
IObservable<Label> GetAllForIssue(string owner, string repo, int number);

/// <summary>
/// Gets all labels for the repository.
Expand All @@ -27,7 +27,7 @@ public interface IObservableIssuesLabelsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="repo">The name of the repository</param>
/// <returns>The list of labels</returns>
IObservable<Label> GetForRepository(string owner, string repo);
IObservable<Label> GetAllForRepository(string owner, string repo);

/// <summary>
/// Gets a single Label by name.
Expand Down Expand Up @@ -141,6 +141,6 @@ public interface IObservableIssuesLabelsClient
/// <param name="repo">The name of the repository</param>
/// <param name="number">The number of the milestone</param>
/// <returns></returns>
IObservable<Label> GetForMilestone(string owner, string repo, int number);
IObservable<Label> GetAllForMilestone(string owner, string repo, int number);
}
}
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableMilestonesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface IObservableMilestonesClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<Milestone> GetForRepository(string owner, string name);
IObservable<Milestone> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets all open milestones for the repository.
Expand All @@ -38,7 +38,7 @@ public interface IObservableMilestonesClient
/// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter and sort the list of Milestones returned</param>
/// <returns></returns>
IObservable<Milestone> GetForRepository(string owner, string name, MilestoneRequest request);
IObservable<Milestone> GetAllForRepository(string owner, string name, MilestoneRequest request);

/// <summary>
/// Creates a milestone for the specified repository. Any user with pull access to a repository can create a
Expand Down
6 changes: 3 additions & 3 deletions Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface IObservableMiscellaneousClient
/// <returns>An <see cref="IObservable{Emoji}"/> of emoji and their URI.</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
Justification = "Makes a network request")]
IObservable<Emoji> GetEmojis();
IObservable<Emoji> GetAllEmojis();

/// <summary>
/// Gets the rendered Markdown for the specified plain-text Markdown document.
Expand All @@ -27,7 +27,7 @@ public interface IObservableMiscellaneousClient
/// </summary>
/// <returns>An observable list of gitignore template names.</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<string> GetGitIgnoreTemplates();
IObservable<string> GetAllGitIgnoreTemplates();

/// <summary>
/// Retrieves the source for a single GitIgnore template
Expand All @@ -42,7 +42,7 @@ public interface IObservableMiscellaneousClient
/// <remarks>This is a PREVIEW API! Use it at your own risk.</remarks>
/// <returns>A list of licenses available on the site</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<LicenseMetadata> GetLicenses();
IObservable<LicenseMetadata> GetAllLicenses();

/// <summary>
/// Retrieves a license based on the licence key such as "mit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface IObservableOrganizationMembersClient
/// <remarks>http://developer.github.com/v3/orgs/members/#public-members-list</remarks>
/// <param name="org">The login for the organization</param>
/// <returns></returns>
IObservable<User> GetPublic(string org);
IObservable<User> GetAllPublic(string org);

/// <summary>
/// Check if a user is, publicly or privately, a member of the organization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IObservablePullRequestReviewCommentsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified repository</returns>
IObservable<PullRequestReviewComment> GetForRepository(string owner, string name);
IObservable<PullRequestReviewComment> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
Expand All @@ -32,7 +32,7 @@ public interface IObservablePullRequestReviewCommentsClient
/// <param name="name">The name of the repository</param>
/// <param name="request">The sorting <see cref="PullRequestReviewCommentRequest">parameters</see></param>
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified repository</returns>
IObservable<PullRequestReviewComment> GetForRepository(string owner, string name, PullRequestReviewCommentRequest request);
IObservable<PullRequestReviewComment> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request);

/// <summary>
/// Gets a single pull request review comment by number.
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface IObservablePullRequestsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
IObservable<PullRequest> GetForRepository(string owner, string name);
IObservable<PullRequest> GetAllForRepository(string owner, string name);

/// <summary>
/// Query pull requests for the repository based on criteria
Expand All @@ -42,7 +42,7 @@ public interface IObservablePullRequestsClient
/// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
IObservable<PullRequest> GetForRepository(string owner, string name, PullRequestRequest request);
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request);

/// <summary>
/// Creates a pull request for the specified repository.
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 @@ -83,7 +83,7 @@ public interface IObservableReleasesClient
/// <param name="id">The id of the <see cref="Release"/>.</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>The list of <see cref="ReleaseAsset"/> for the specified release of the specified repository.</returns>
IObservable<ReleaseAsset> GetAssets(string owner, string name, int id);
IObservable<ReleaseAsset> GetAllAssets(string owner, string name, int id);

/// <summary>
/// Uploads a <see cref="ReleaseAsset"/> for the specified release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IObservableRepositoryCommentsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
IObservable<CommitComment> GetForRepository(string owner, string name);
IObservable<CommitComment> GetAllForRepository(string owner, string name);

/// <summary>
/// Gets Commit Comments for a specified Commit.
Expand All @@ -35,7 +35,7 @@ public interface IObservableRepositoryCommentsClient
/// <param name="name">The name of the repository</param>
/// <param name="sha">The sha of the commit</param>
/// <returns></returns>
IObservable<CommitComment> GetForCommit(string owner, string name, string sha);
IObservable<CommitComment> GetAllForCommit(string owner, string name, string sha);

/// <summary>
/// Creates a new Commit Comment for a specified Commit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IObservableRepositoryContentsClient
/// <returns>
/// A collection of <see cref="RepositoryContent"/> representing the content at the specified path
/// </returns>
IObservable<RepositoryContent> GetContents(string owner, string name, string path);
IObservable<RepositoryContent> GetAllContents(string owner, string name, string path);

/// <summary>
/// Creates a commit that creates a new file in a repository.
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/IObservableTeamsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface IObservableTeamsClient
/// </remarks>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A list of the team's member <see cref="User"/>s.</returns>
IObservable<User> GetMembers(int id);
IObservable<User> GetAllMembers(int id);

/// <summary>
/// Returns newly created <see cref="Team" /> for the current org.
Expand Down Expand Up @@ -77,7 +77,7 @@ public interface IObservableTeamsClient
/// </summary>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>The team's repositories</returns>
IObservable<Repository> GetRepositories(int id);
IObservable<Repository> GetAllRepositories(int id);

/// <summary>
/// Add a member to the team
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableAssigneesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ObservableAssigneesClient(IGitHubClient client)
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns></returns>
public IObservable<User> GetForRepository(string owner, string name)
public IObservable<User> GetAllForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Expand Down
10 changes: 5 additions & 5 deletions Octokit.Reactive/Clients/ObservableEventsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public IObservable<Activity> GetAllForOrganization(string organization)
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has received.</returns>
public IObservable<Activity> GetUserReceived(string user)
public IObservable<Activity> GetAllUserReceived(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");

Expand All @@ -98,7 +98,7 @@ public IObservable<Activity> GetUserReceived(string user)
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has received.</returns>
public IObservable<Activity> GetUserReceivedPublic(string user)
public IObservable<Activity> GetAllUserReceivedPublic(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");

Expand All @@ -113,7 +113,7 @@ public IObservable<Activity> GetUserReceivedPublic(string user)
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the <see cref="Activity"/>s that a particular user has performed.</returns>
public IObservable<Activity> GetUserPerformed(string user)
public IObservable<Activity> GetAllUserPerformed(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");

Expand All @@ -128,7 +128,7 @@ public IObservable<Activity> GetUserPerformed(string user)
/// </remarks>
/// <param name="user">The login of the user</param>
/// <returns>All the public <see cref="Activity"/>s that a particular user has performed.</returns>
public IObservable<Activity> GetUserPerformedPublic(string user)
public IObservable<Activity> GetAllUserPerformedPublic(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");

Expand All @@ -144,7 +144,7 @@ public IObservable<Activity> GetUserPerformedPublic(string user)
/// <param name="user">The login of the user</param>
/// <param name="organization">The name of the organization</param>
/// <returns>All the public <see cref="Activity"/>s that are associated with an organization.</returns>
public IObservable<Activity> GetForAnOrganization(string user, string organization)
public IObservable<Activity> GetAllForAnOrganization(string user, string organization)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IObservable<GistComment> Get(string gistId, int commentId)
/// <remarks>http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist</remarks>
/// <param name="gistId">The id of the gist</param>
/// <returns>IObservable{GistComment}.</returns>
public IObservable<GistComment> GetForGist(string gistId)
public IObservable<GistComment> GetAllForGist(string gistId)
{
return _connection.GetAndFlattenAllPages<GistComment>(ApiUrls.GistComments(gistId));
}
Expand Down
Loading

0 comments on commit 40abcb7

Please sign in to comment.