mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
[FEAT]: Create a GitHub App from a manifest
* Create a GitHub App from a manifest * Add missing InstallationPermissions * observable and tests * Remove ManualRoute on Observable route --------- Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
This commit is contained in:
@@ -110,5 +110,13 @@ namespace Octokit.Reactive
|
||||
/// <remarks>https://developer.github.com/v3/apps/#find-user-installation</remarks>
|
||||
/// <param name="user">The name of the user</param>
|
||||
IObservable<Installation> GetUserInstallationForCurrent(string user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a GitHub app by completing the handshake necessary when implementing the GitHub App Manifest flow.
|
||||
/// https://docs.github.com/apps/sharing-github-apps/registering-a-github-app-from-a-manifest
|
||||
/// </summary>
|
||||
/// <remarks>https://docs.github.com/rest/apps/apps#create-a-github-app-from-a-manifest</remarks>
|
||||
/// <param name="code">Temporary code in a code parameter.</param>
|
||||
IObservable<GitHubAppFromManifest> CreateAppFromManifest(string code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,5 +175,18 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.GetUserInstallationForCurrent(user).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a GitHub app by completing the handshake necessary when implementing the GitHub App Manifest flow.
|
||||
/// https://docs.github.com/apps/sharing-github-apps/registering-a-github-app-from-a-manifest
|
||||
/// </summary>
|
||||
/// <remarks>https://docs.github.com/rest/apps/apps#create-a-github-app-from-a-manifest</remarks>
|
||||
/// <param name="code">Temporary code in a code parameter.</param>
|
||||
public IObservable<GitHubAppFromManifest> CreateAppFromManifest(string code)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(code, nameof(code));
|
||||
|
||||
return _client.CreateAppFromManifest(code).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user