Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long IDs #2907

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Octokit.AsyncPaginationExtension/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@
=> pageSize > 0 ? new PaginatedList<Milestone>(options => t.GetAllForRepository(repositoryId, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="IMiscellaneousClient.GetAllLicenses(ApiOptions)"/>
public static IPaginatedList<LicenseMetadata> GetAllLicensesAsync(this IMiscellaneousClient t, int pageSize = DEFAULT_PAGE_SIZE)

Check warning on line 334 in Octokit.AsyncPaginationExtension/Extensions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'IMiscellaneousClient' is obsolete: 'Use individual clients available on the GitHubClient for these methods'

Check warning on line 334 in Octokit.AsyncPaginationExtension/Extensions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'IMiscellaneousClient' is obsolete: 'Use individual clients available on the GitHubClient for these methods'
=> pageSize > 0 ? new PaginatedList<LicenseMetadata>(t.GetAllLicenses, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

Check warning on line 335 in Octokit.AsyncPaginationExtension/Extensions.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'IMiscellaneousClient.GetAllLicenses(ApiOptions)' is obsolete: 'This client is being deprecated and will be removed in the future. Use LicensesClient.GetAllLicenses instead.'

/// <inheritdoc cref="INotificationsClient.GetAllForCurrent(ApiOptions)"/>
public static IPaginatedList<Notification> GetAllForCurrentAsync(this INotificationsClient t, int pageSize = DEFAULT_PAGE_SIZE)
Expand Down Expand Up @@ -539,11 +539,11 @@
=> pageSize > 0 ? new PaginatedList<Release>(options => t.GetAll(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="IReleasesClient.GetAllAssets(string, string, int, ApiOptions)"/>
public static IPaginatedList<ReleaseAsset> GetAllAssetsAsync(this IReleasesClient t, string owner, string name, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<ReleaseAsset> GetAllAssetsAsync(this IReleasesClient t, string owner, string name, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<ReleaseAsset>(options => t.GetAllAssets(owner, name, id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="IReleasesClient.GetAllAssets(long, int, ApiOptions)"/>
public static IPaginatedList<ReleaseAsset> GetAllAssetsAsync(this IReleasesClient t, long repositoryId, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<ReleaseAsset> GetAllAssetsAsync(this IReleasesClient t, long repositoryId, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<ReleaseAsset>(options => t.GetAllAssets(repositoryId, id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="IRepoCollaboratorsClient.GetAll(string, string, ApiOptions)"/>
Expand Down Expand Up @@ -755,23 +755,23 @@
=> pageSize > 0 ? new PaginatedList<Team>(t.GetAllForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="ITeamsClient.GetAllChildTeams(int, ApiOptions)"/>
public static IPaginatedList<Team> GetAllChildTeamsAsync(this ITeamsClient t, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<Team> GetAllChildTeamsAsync(this ITeamsClient t, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<Team>(options => t.GetAllChildTeams(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="ITeamsClient.GetAllMembers(int, ApiOptions)"/>
public static IPaginatedList<User> GetAllMembersAsync(this ITeamsClient t, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<User> GetAllMembersAsync(this ITeamsClient t, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<User>(options => t.GetAllMembers(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="ITeamsClient.GetAllMembers(int, TeamMembersRequest, ApiOptions)"/>
public static IPaginatedList<User> GetAllMembersAsync(this ITeamsClient t, int id, TeamMembersRequest request, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<User> GetAllMembersAsync(this ITeamsClient t, long id, TeamMembersRequest request, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<User>(options => t.GetAllMembers(id, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="ITeamsClient.GetAllRepositories(int, ApiOptions)"/>
public static IPaginatedList<Repository> GetAllRepositoriesAsync(this ITeamsClient t, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<Repository> GetAllRepositoriesAsync(this ITeamsClient t, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<Repository>(options => t.GetAllRepositories(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="ITeamsClient.GetAllPendingInvitations(int, ApiOptions)"/>
public static IPaginatedList<OrganizationMembershipInvitation> GetAllPendingInvitationsAsync(this ITeamsClient t, int id, int pageSize = DEFAULT_PAGE_SIZE)
public static IPaginatedList<OrganizationMembershipInvitation> GetAllPendingInvitationsAsync(this ITeamsClient t, long id, int pageSize = DEFAULT_PAGE_SIZE)
=> pageSize > 0 ? new PaginatedList<OrganizationMembershipInvitation>(options => t.GetAllPendingInvitations(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");

/// <inheritdoc cref="IUserEmailsClient.GetAll(ApiOptions)"/>
Expand Down
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/IObservableAuthorizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public interface IObservableAuthorizationsClient
/// <returns>An <see cref="Authorization"/></returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "It's fiiiine. It's fine. Trust us.")]
IObservable<Authorization> Get(int id);
IObservable<Authorization> Get(long id);

/// <summary>
/// Creates a new personal token for the authenticated user.
Expand Down Expand Up @@ -219,7 +219,7 @@ IObservable<ApplicationAuthorization> GetOrCreateApplicationAuthentication(
/// <param name="id">The id of the <see cref="Authorization"/></param>
/// <param name="authorizationUpdate">The changes to make to the authorization</param>
/// <returns></returns>
IObservable<Authorization> Update(int id, AuthorizationUpdate authorizationUpdate);
IObservable<Authorization> Update(long id, AuthorizationUpdate authorizationUpdate);

/// <summary>
/// Deletes the specified <see cref="Authorization"/>.
Expand All @@ -234,7 +234,7 @@ IObservable<ApplicationAuthorization> GetOrCreateApplicationAuthentication(
/// Thrown when the current user does not have permission to make the request.
/// </exception>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
IObservable<Unit> Delete(int id);
IObservable<Unit> Delete(long id);

/// <summary>
/// Deletes the specified <see cref="Authorization"/>.
Expand All @@ -250,6 +250,6 @@ IObservable<ApplicationAuthorization> GetOrCreateApplicationAuthentication(
/// Thrown when the current user does not have permission to make the request.
/// </exception>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
IObservable<Unit> Delete(int id, string twoFactorAuthenticationCode);
IObservable<Unit> Delete(long id, string twoFactorAuthenticationCode);
}
}
12 changes: 6 additions & 6 deletions Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IObservableIssueCommentsClient
/// <param name="id">The issue comment id</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<IssueComment> Get(string owner, string name, int id);
IObservable<IssueComment> Get(string owner, string name, long id);

/// <summary>
/// Gets a single Issue Comment by id.
Expand All @@ -31,7 +31,7 @@ public interface IObservableIssueCommentsClient
/// <param name="id">The issue comment id</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<IssueComment> Get(long repositoryId, int id);
IObservable<IssueComment> Get(long repositoryId, long id);

/// <summary>
/// Gets Issue Comments for a repository.
Expand Down Expand Up @@ -204,7 +204,7 @@ public interface IObservableIssueCommentsClient
/// <param name="name">The name of the repository</param>
/// <param name="id">The comment id</param>
/// <param name="commentUpdate">The modified comment</param>
IObservable<IssueComment> Update(string owner, string name, int id, string commentUpdate);
IObservable<IssueComment> Update(string owner, string name, long id, string commentUpdate);

/// <summary>
/// Updates a specified Issue Comment.
Expand All @@ -213,7 +213,7 @@ public interface IObservableIssueCommentsClient
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="id">The comment id</param>
/// <param name="commentUpdate">The modified comment</param>
IObservable<IssueComment> Update(long repositoryId, int id, string commentUpdate);
IObservable<IssueComment> Update(long repositoryId, long id, string commentUpdate);

/// <summary>
/// Deletes the specified Issue Comment
Expand All @@ -222,14 +222,14 @@ public interface IObservableIssueCommentsClient
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="id">The comment id</param>
IObservable<Unit> Delete(string owner, string name, int id);
IObservable<Unit> Delete(string owner, string name, long id);

/// <summary>
/// Deletes the specified Issue Comment
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/comments/#delete-a-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="id">The comment id</param>
IObservable<Unit> Delete(long repositoryId, int id);
IObservable<Unit> Delete(long repositoryId, long id);
}
}
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/IObservableMigrationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ IObservable<Migration> GetAll(
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<Migration> Get(
string org,
int id);
long id);

/// <summary>
/// Get the migration archive.
Expand All @@ -77,7 +77,7 @@ IObservable<Migration> Get(
/// <returns>The binary contents of the archive as a byte array.</returns>
IObservable<byte[]> GetArchive(
string org,
int id);
long id);

/// <summary>
/// Deletes a previous migration archive.
Expand All @@ -90,7 +90,7 @@ IObservable<byte[]> GetArchive(
/// <returns></returns>
IObservable<Unit> DeleteArchive(
string org,
int id);
long id);

/// <summary>
/// Unlocks a repository that was locked for migration.
Expand All @@ -104,7 +104,7 @@ IObservable<Unit> DeleteArchive(
/// <returns></returns>
IObservable<Unit> UnlockRepository(
string org,
int id,
long id,
string repo);
}
}
10 changes: 5 additions & 5 deletions Octokit.Reactive/Clients/IObservableNotificationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,35 +163,35 @@ public interface IObservableNotificationsClient
/// <param name="id">The Id of the notification to retrieve.</param>
/// <remarks>http://developer.github.com/v3/activity/notifications/#view-a-single-thread</remarks>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<Notification> Get(int id);
IObservable<Notification> Get(long id);

/// <summary>
/// Marks a single notification as read.
/// </summary>
/// <param name="id">The id of the notification.</param>
/// <remarks>http://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read</remarks>
IObservable<Unit> MarkAsRead(int id);
IObservable<Unit> MarkAsRead(long id);

/// <summary>
/// Retrives a <see cref="ThreadSubscription"/> for the provided thread id.
/// </summary>
/// <param name="id">The Id of the thread to retrieve subscription status.</param>
/// <remarks>http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription</remarks>
IObservable<ThreadSubscription> GetThreadSubscription(int id);
IObservable<ThreadSubscription> GetThreadSubscription(long id);

/// <summary>
/// Sets the authenticated user's subscription settings for a given thread.
/// </summary>
/// <param name="id">The Id of the thread to update.</param>
/// <param name="threadSubscription">The subscription parameters to set.</param>
/// <remarks>http://developer.github.com/v3/activity/notifications/#set-a-thread-subscription</remarks>
IObservable<ThreadSubscription> SetThreadSubscription(int id, NewThreadSubscription threadSubscription);
IObservable<ThreadSubscription> SetThreadSubscription(long id, NewThreadSubscription threadSubscription);

/// <summary>
/// Deletes the authenticated user's subscription to a given thread.
/// </summary>
/// <param name="id">The Id of the thread to delete subscription from.</param>
/// <remarks>http://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription</remarks>
IObservable<Unit> DeleteThreadSubscription(int id);
IObservable<Unit> DeleteThreadSubscription(long id);
}
}
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/IObservableProjectCardsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="id">The id of the card</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<ProjectCard> Get(int id);
IObservable<ProjectCard> Get(long id);

/// <summary>
/// Creates a card.
Expand All @@ -79,7 +79,7 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="id">The id of the card</param>
/// <param name="projectCardUpdate">New values to update the card with</param>
IObservable<ProjectCard> Update(int id, ProjectCardUpdate projectCardUpdate);
IObservable<ProjectCard> Update(long id, ProjectCardUpdate projectCardUpdate);

/// <summary>
/// Deletes a card.
Expand All @@ -88,7 +88,7 @@ public interface IObservableProjectCardsClient
/// See the <a href="https://developer.github.com/v3/repos/projects/#delete-a-project-card">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The id of the card</param>
IObservable<bool> Delete(int id);
IObservable<bool> Delete(long id);

/// <summary>
/// Moves a card.
Expand All @@ -98,6 +98,6 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="id">The id of the card</param>
/// <param name="position">The position to move the card</param>
IObservable<bool> Move(int id, ProjectCardMove position);
IObservable<bool> Move(long id, ProjectCardMove position);
}
}
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/IObservableProjectColumnsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface IObservableProjectColumnsClient
/// </remarks>
/// <param name="id">The id of the column</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<ProjectColumn> Get(int id);
IObservable<ProjectColumn> Get(long id);

/// <summary>
/// Creates a column.
Expand All @@ -58,7 +58,7 @@ public interface IObservableProjectColumnsClient
/// </remarks>
/// <param name="id">The id of the column</param>
/// <param name="projectColumnUpdate">New values to update the column with</param>
IObservable<ProjectColumn> Update(int id, ProjectColumnUpdate projectColumnUpdate);
IObservable<ProjectColumn> Update(long id, ProjectColumnUpdate projectColumnUpdate);

/// <summary>
/// Deletes a column.
Expand All @@ -67,7 +67,7 @@ public interface IObservableProjectColumnsClient
/// See the <a href="https://developer.github.com/v3/projects/columns/#delete-a-project-column">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The id of the column</param>
IObservable<bool> Delete(int id);
IObservable<bool> Delete(long id);

/// <summary>
/// Moves a column.
Expand All @@ -77,6 +77,6 @@ public interface IObservableProjectColumnsClient
/// </remarks>
/// <param name="id">The id of the column</param>
/// <param name="position">The position to move the column</param>
IObservable<bool> Move(int id, ProjectColumnMove position);
IObservable<bool> Move(long id, ProjectColumnMove position);
}
}
6 changes: 3 additions & 3 deletions Octokit.Reactive/Clients/IObservableProjectsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public interface IObservableProjectsClient
/// </remarks>
/// <param name="id">The Id of the project</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<Project> Get(int id);
IObservable<Project> Get(long id);

/// <summary>
/// Creates a project for the specified repository.
Expand Down Expand Up @@ -173,7 +173,7 @@ public interface IObservableProjectsClient
/// </remarks>
/// <param name="id">The Id of the project</param>
/// <param name="projectUpdate">The modified project</param>
IObservable<Project> Update(int id, ProjectUpdate projectUpdate);
IObservable<Project> Update(long id, ProjectUpdate projectUpdate);

/// <summary>
/// Deletes a project.
Expand All @@ -182,7 +182,7 @@ public interface IObservableProjectsClient
/// See the <a href="https://developer.github.com/v3/repos/projects/#delete-a-project">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The Id of the project</param>
IObservable<bool> Delete(int id);
IObservable<bool> Delete(long id);

/// <summary>
/// A client for GitHub's Project Cards API.
Expand Down
Loading
Loading