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

WIP: Change all applicable IDs in the project from int --> long #2352

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
97ee96d
Starting the changes
SeanKilleen Aug 23, 2021
1897e35
Address in gist comments
SeanKilleen Aug 23, 2021
070b4a0
Fix in organization hooks client
SeanKilleen Aug 23, 2021
0b5eda3
ProjectCardsClient
SeanKilleen Aug 23, 2021
b2d4fc5
ProjectColumnsClient
SeanKilleen Aug 23, 2021
6378fb5
ReleasesClient
SeanKilleen Aug 23, 2021
149aebc
RepositoryHooksClient
SeanKilleen Aug 23, 2021
f51b65a
Missed one on RepositoryHooksClient
SeanKilleen Aug 23, 2021
d00a19d
RepositoryInvitationsClient
SeanKilleen Aug 23, 2021
ab954a8
UserAdministrationClient
SeanKilleen Aug 23, 2021
394e1bb
int? --> long?
SeanKilleen Aug 23, 2021
28dabf3
Account ID
SeanKilleen Aug 23, 2021
c003796
Author ID
SeanKilleen Aug 23, 2021
1897c15
Authorization Id
SeanKilleen Aug 23, 2021
40337f0
CommitComment Id
SeanKilleen Aug 23, 2021
f346b48
DeployKey Id
SeanKilleen Aug 23, 2021
045006a
Deployment Id
SeanKilleen Aug 23, 2021
e1a5538
DeploymentStatus and GistComment Ids
SeanKilleen Aug 23, 2021
5542dc3
GpgKey id
SeanKilleen Aug 23, 2021
908b503
Issue Id
SeanKilleen Aug 23, 2021
326a2b7
IssueComment Id
SeanKilleen Aug 23, 2021
1421d98
Migration Id
SeanKilleen Aug 23, 2021
fcdfe18
Organization
SeanKilleen Aug 23, 2021
567515e
OrganizationHook Id
SeanKilleen Aug 23, 2021
cf2c154
Org Membership Invitation Id
SeanKilleen Aug 23, 2021
dadf8f4
Project Id
SeanKilleen Aug 23, 2021
07589c0
ProjectCard Id
SeanKilleen Aug 23, 2021
7a3b831
ProjectColumn Id
SeanKilleen Aug 23, 2021
67649aa
PublicKey Id
SeanKilleen Aug 23, 2021
57adb17
PullRequestReviewComment Id
SeanKilleen Aug 23, 2021
e2d92aa
Reaction Id
SeanKilleen Aug 23, 2021
f6b2a5e
Release Id
SeanKilleen Aug 23, 2021
e559fa9
ReleaseAsset Ids
SeanKilleen Aug 23, 2021
e09e818
RepositoryContributor
SeanKilleen Aug 23, 2021
c0f6e01
RepositoryHook
SeanKilleen Aug 23, 2021
e78ebd8
More Ids
SeanKilleen Aug 23, 2021
35450fb
some observable client changes
SeanKilleen Aug 23, 2021
ad5f66c
more obserbable client updates
SeanKilleen Aug 23, 2021
19f6360
more observable contract updates
SeanKilleen Aug 23, 2021
d81979e
ObservableReleasesClient
SeanKilleen Aug 23, 2021
f7d05c5
ObservableRepositoryHooksClient
SeanKilleen Aug 23, 2021
fcf1a64
ObservableRepositoryInvitationsClient
SeanKilleen Aug 23, 2021
beec8c0
ObservableUserAdministrationClient
SeanKilleen Aug 23, 2021
d579cf2
Fix some missed paths
SeanKilleen Aug 23, 2021
e62b8f5
Cover path executed by tests
SeanKilleen Aug 23, 2021
aa49837
Revert "Cover path executed by tests"
SeanKilleen Aug 23, 2021
4fcc146
IssueCommentReactionsClient
SeanKilleen Aug 23, 2021
0941d70
oops; CommitComment / IssueComment ID and number are actually the sam…
SeanKilleen Aug 23, 2021
68dbb46
whoops -- migration Id appears to be an int as well.
SeanKilleen Aug 23, 2021
6f03e48
oops, looks like account / organization / user IDs are ints as well.
SeanKilleen Aug 23, 2021
22a4aef
Oops, looks like OrganizationHook is an int as well.
SeanKilleen Aug 23, 2021
6a21bfb
It appears that project ID is actually a long, so updating the column…
SeanKilleen Aug 23, 2021
9988f30
ProjectColumn ColumnId is actually an int apparently
SeanKilleen Aug 23, 2021
5f7a252
Issue ID is a long; updating test to reflect.
SeanKilleen Aug 23, 2021
b496ce9
update test helper to reflect ID change
SeanKilleen Aug 23, 2021
0b81fe5
oops; project ID is an int.
SeanKilleen Aug 23, 2021
f214033
oops, PullRequestReviewComment ID is an int.
SeanKilleen Aug 23, 2021
65c353b
Oops, apparently DeployKey is an int as well.
SeanKilleen Aug 23, 2021
012d4ec
fix ctor on PR Review Comment
SeanKilleen Aug 23, 2021
92e36b5
update test helper to use long hook id
SeanKilleen Aug 23, 2021
7220060
Typo I happened to see
SeanKilleen Aug 23, 2021
9160978
Oops. Team ID is an integer.
SeanKilleen Aug 23, 2021
ed8a5d7
GpgKey Id is an int in the API.
SeanKilleen Aug 23, 2021
bb9efdb
oops, PublicKey Id is an int.
SeanKilleen Aug 23, 2021
713b9db
update helper for long issueId
SeanKilleen Aug 23, 2021
047a435
Fix a test.
SeanKilleen Aug 23, 2021
dca1976
Fix a test.
SeanKilleen Aug 23, 2021
e7f1c83
oops, Reaction IDs are integers too.
SeanKilleen Aug 23, 2021
4f54a14
Update last reactions client back to int
SeanKilleen Aug 23, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface IObservableEnterpriseLdapClient
/// <param name="teamId">The teamId to update LDAP mapping</param>
/// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param>
/// <returns>The <see cref="Team"/> object.</returns>
IObservable<Team> UpdateTeamMapping(int teamId, NewLdapMapping newLdapMapping);
IObservable<Team> UpdateTeamMapping(long teamId, NewLdapMapping newLdapMapping);

/// <summary>
/// Queue an LDAP Sync job for a team on a GitHub Enterprise appliance (must be Site Admin user).
Expand All @@ -53,6 +53,6 @@ public interface IObservableEnterpriseLdapClient
/// </remarks>
/// <param name="teamId">The teamId to update LDAP mapping</param>
/// <returns>The <see cref="LdapSyncResponse"/> of the queue request.</returns>
IObservable<LdapSyncResponse> QueueSyncTeamMapping(int teamId);
IObservable<LdapSyncResponse> QueueSyncTeamMapping(long teamId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public IObservable<LdapSyncResponse> QueueSyncUserMapping(string userName)
/// <param name="teamId">The teamId to update LDAP mapping</param>
/// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param>
/// <returns>The <see cref="Team"/> object.</returns>
public IObservable<Team> UpdateTeamMapping(int teamId, NewLdapMapping newLdapMapping)
public IObservable<Team> UpdateTeamMapping(long teamId, NewLdapMapping newLdapMapping)
{
return _client.UpdateTeamMapping(teamId, newLdapMapping).ToObservable();
}
Expand All @@ -71,7 +71,7 @@ public IObservable<Team> UpdateTeamMapping(int teamId, NewLdapMapping newLdapMap
/// </remarks>
/// <param name="teamId">The teamId to update LDAP mapping</param>
/// <returns>The <see cref="LdapSyncResponse"/> of the queue request.</returns>
public IObservable<LdapSyncResponse> QueueSyncTeamMapping(int teamId)
public IObservable<LdapSyncResponse> QueueSyncTeamMapping(long teamId)
{
return _client.QueueSyncTeamMapping(teamId).ToObservable();
}
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/IObservableDeploymentStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IObservableDeploymentStatusClient
/// <param name="owner">The owner of the repository.</param>
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
IObservable<DeploymentStatus> GetAll(string owner, string name, int deploymentId);
IObservable<DeploymentStatus> GetAll(string owner, string name, long deploymentId);

/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
Expand All @@ -32,7 +32,7 @@ public interface IObservableDeploymentStatusClient
/// </remarks>
/// <param name="repositoryId">The Id of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
IObservable<DeploymentStatus> GetAll(long repositoryId, int deploymentId);
IObservable<DeploymentStatus> GetAll(long repositoryId, long deploymentId);

/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
Expand All @@ -45,7 +45,7 @@ public interface IObservableDeploymentStatusClient
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="options">Options for changing the API response</param>
IObservable<DeploymentStatus> GetAll(string owner, string name, int deploymentId, ApiOptions options);
IObservable<DeploymentStatus> GetAll(string owner, string name, long deploymentId, ApiOptions options);

/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
Expand All @@ -57,7 +57,7 @@ public interface IObservableDeploymentStatusClient
/// <param name="repositoryId">The Id of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="options">Options for changing the API response</param>
IObservable<DeploymentStatus> GetAll(long repositoryId, int deploymentId, ApiOptions options);
IObservable<DeploymentStatus> GetAll(long repositoryId, long deploymentId, ApiOptions options);

/// <summary>
/// Creates a new status for the given deployment. Users with push access can create deployment
Expand All @@ -70,7 +70,7 @@ public interface IObservableDeploymentStatusClient
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="newDeploymentStatus">The new deployment status to create.</param>
IObservable<DeploymentStatus> Create(string owner, string name, int deploymentId, NewDeploymentStatus newDeploymentStatus);
IObservable<DeploymentStatus> Create(string owner, string name, long deploymentId, NewDeploymentStatus newDeploymentStatus);

/// <summary>
/// Creates a new status for the given deployment. Users with push access can create deployment
Expand All @@ -82,6 +82,6 @@ public interface IObservableDeploymentStatusClient
/// <param name="repositoryId">The Id of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="newDeploymentStatus">The new deployment status to create.</param>
IObservable<DeploymentStatus> Create(long repositoryId, int deploymentId, NewDeploymentStatus newDeploymentStatus);
IObservable<DeploymentStatus> Create(long repositoryId, long deploymentId, NewDeploymentStatus newDeploymentStatus);
}
}
6 changes: 3 additions & 3 deletions Octokit.Reactive/Clients/IObservableGistCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IObservableGistCommentsClient
/// <returns>IObservable{GistComment}.</returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable<GistComment> Get(string gistId, int commentId);
IObservable<GistComment> Get(string gistId, long commentId);

/// <summary>
/// Gets all comments for the gist with the specified id.
Expand Down Expand Up @@ -51,7 +51,7 @@ public interface IObservableGistCommentsClient
/// <param name="commentId">The id of the comment</param>
/// <param name="comment">The updated body of the comment</param>
/// <returns>IObservable{GistComment}.</returns>
IObservable<GistComment> Update(string gistId, int commentId, string comment);
IObservable<GistComment> Update(string gistId, long commentId, string comment);

/// <summary>
/// Deletes the comment with the specified gist- and comment id.
Expand All @@ -60,6 +60,6 @@ public interface IObservableGistCommentsClient
/// <param name="gistId">The id of the gist</param>
/// <param name="commentId">The id of the comment</param>
/// <returns>IObservable{Unit}.</returns>
IObservable<Unit> Delete(string gistId, int commentId);
IObservable<Unit> Delete(string gistId, long commentId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface IObservableOrganizationHooksClient
/// <param name="hookId">The organizations hook id</param>
/// <remarks>See <a href="https://developer.github.com/v3/orgs/hooks/#get-single-hook">API documentation</a> for more information.</remarks>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "This is ok; we're matching HTTP verbs not keyworks")]
IObservable<OrganizationHook> Get(string org, int hookId);
IObservable<OrganizationHook> Get(string org, long hookId);

/// <summary>
/// Creates a hook for a organization
Expand All @@ -44,22 +44,22 @@ public interface IObservableOrganizationHooksClient
/// <param name="hookId">The organizations hook id</param>
/// <param name="hook">The hook's parameters</param>
/// <remarks>See <a href="https://developer.github.com/v3/orgs/hooks/#edit-a-hook">API documentation</a> for more information.</remarks>
IObservable<OrganizationHook> Edit(string org, int hookId, EditOrganizationHook hook);
IObservable<OrganizationHook> Edit(string org, long hookId, EditOrganizationHook hook);

/// <summary>
/// This will trigger a ping event to be sent to the hook.
/// </summary>
/// <param name="org">The organizations name</param>
/// <param name="hookId">The organizations hook id</param>
/// <remarks>See <a href="https://developer.github.com/v3/orgs/hooks/#ping-a-hook">API documentation</a> for more information.</remarks>
IObservable<Unit> Ping(string org, int hookId);
IObservable<Unit> Ping(string org, long hookId);

/// <summary>
/// Deletes a hook for a organization
/// </summary>
/// <param name="org">The organizations name</param>
/// <param name="hookId">The organizations hook id</param>
/// <remarks>See <a href="https://developer.github.com/v3/orgs/hooks/#delete-a-hook">API documentation</a> for more information.</remarks>
IObservable<Unit> Delete(string org, int hookId);
IObservable<Unit> Delete(string org, long hookId);
}
}
18 changes: 9 additions & 9 deletions Octokit.Reactive/Clients/IObservableProjectCardsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface IObservableProjectCardsClient
/// See the <a href="https://developer.github.com/v3/repos/projects/#list-projects-cards">API documentation</a> for more information.
/// </remarks>
/// <param name="columnId">The id of the column</param>
IObservable<ProjectCard> GetAll(int columnId);
IObservable<ProjectCard> GetAll(long columnId);

/// <summary>
/// Gets all cards.
Expand All @@ -28,7 +28,7 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="columnId">The id of the column</param>
/// <param name="options">Options for changing the API response</param>
IObservable<ProjectCard> GetAll(int columnId, ApiOptions options);
IObservable<ProjectCard> GetAll(long columnId, ApiOptions options);

/// <summary>
/// Gets all cards.
Expand All @@ -38,7 +38,7 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="columnId">The id of the column</param>
/// <param name="request">Used to filter the list of project cards returned</param>
IObservable<ProjectCard> GetAll(int columnId, ProjectCardRequest request);
IObservable<ProjectCard> GetAll(long columnId, ProjectCardRequest request);

/// <summary>
/// Gets all cards.
Expand All @@ -49,7 +49,7 @@ public interface IObservableProjectCardsClient
/// <param name="columnId">The id of the column</param>
/// <param name="request">Used to filter the list of project cards returned</param>
/// <param name="options">Options for changing the API response</param>
IObservable<ProjectCard> GetAll(int columnId, ProjectCardRequest request, ApiOptions options);
IObservable<ProjectCard> GetAll(long columnId, ProjectCardRequest request, ApiOptions options);

/// <summary>
/// Gets a single card.
Expand All @@ -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 @@ -69,7 +69,7 @@ public interface IObservableProjectCardsClient
/// </remarks>
/// <param name="columnId">The id of the column</param>
/// <param name="newProjectCard">The card to create</param>
IObservable<ProjectCard> Create(int columnId, NewProjectCard newProjectCard);
IObservable<ProjectCard> Create(long columnId, NewProjectCard newProjectCard);

/// <summary>
/// Updates 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);
}
}
14 changes: 7 additions & 7 deletions Octokit.Reactive/Clients/IObservableProjectColumnsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface IObservableProjectColumnsClient
/// See the <a href="https://developer.github.com/v3/projects/columns/#list-project-columns">API documentation</a> for more information.
/// </remarks>
/// <param name="projectId">The Id of the project</param>
IObservable<ProjectColumn> GetAll(int projectId);
IObservable<ProjectColumn> GetAll(long projectId);

/// <summary>
/// Gets all columns.
Expand All @@ -28,7 +28,7 @@ public interface IObservableProjectColumnsClient
/// </remarks>
/// <param name="projectId">The Id of the project</param>
/// <param name="options">Options for changing the API response</param>
IObservable<ProjectColumn> GetAll(int projectId, ApiOptions options);
IObservable<ProjectColumn> GetAll(long projectId, ApiOptions options);

/// <summary>
/// Gets a single column.
Expand All @@ -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 @@ -48,7 +48,7 @@ public interface IObservableProjectColumnsClient
/// </remarks>
/// <param name="projectId">The Id of the project</param>
/// <param name="newProjectColumn">The column to create</param>
IObservable<ProjectColumn> Create(int projectId, NewProjectColumn newProjectColumn);
IObservable<ProjectColumn> Create(long projectId, NewProjectColumn newProjectColumn);

/// <summary>
/// Updates 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);
}
}
Loading