mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Implement renaming and deprecation of GitHub App Installation Access Token route (#1860)
* change existing CreateInstallationToken method to use new /app/installations route, and provide an obsolete CreateInstallationTokenPreview() method still using the old route, in order to support GHE 2.14 * suppress obsolete usage warning in tests * add unit test for new method * add new method to observable client * fix routes in tests * remove CreateInstallationTokenPreview() as it isnt actually required
This commit is contained in:
@@ -98,7 +98,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
client.CreateInstallationToken(fakeInstallationId);
|
||||
|
||||
connection.Received().Post<AccessToken>(Arg.Is<Uri>(u => u.ToString() == "installations/3141/access_tokens"), string.Empty, "application/vnd.github.machine-man-preview+json");
|
||||
connection.Received().Post<AccessToken>(Arg.Is<Uri>(u => u.ToString() == "app/installations/3141/access_tokens"), string.Empty, "application/vnd.github.machine-man-preview+json");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Octokit
|
||||
/// <param name="installationId">The Id of the GitHub App installation.</param>
|
||||
public static Uri AccessTokens(long installationId)
|
||||
{
|
||||
return "installations/{0}/access_tokens".FormatUri(installationId);
|
||||
return "app/installations/{0}/access_tokens".FormatUri(installationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user