/// <inheritdoc/> protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken)) { if (Org != null && Id != null && Repo != null) { var orgValue = Org.GetValue(dc.State); var idValue = Id.GetValue(dc.State); var repoValue = Repo.GetValue(dc.State); return(gitHubClient.Migration.Migrations.UnlockRepository(orgValue, (Int32)idValue, repoValue)); } throw new ArgumentNullException("Required [org,id,repo] arguments missing for GitHubClient.Migration.Migrations.UnlockRepository"); }
/// <inheritdoc/> protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken)) { if (Org != null && User != null && AddOrUpdateRequest != null) { var orgValue = Org.GetValue(dc.State); var userValue = User.GetValue(dc.State); var addOrUpdateRequestValue = AddOrUpdateRequest.GetValue(dc.State); return(await gitHubClient.Organization.Member.AddOrUpdateOrganizationMembership(orgValue, userValue, addOrUpdateRequestValue).ConfigureAwait(false)); } throw new ArgumentNullException("Required [org,user,addOrUpdateRequest] arguments missing for GitHubClient.Organization.Member.AddOrUpdateOrganizationMembership"); }
/// <inheritdoc/> protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken)) { if (Org != null && HookId != null && Hook != null) { var orgValue = Org.GetValue(dc.State); var hookIdValue = HookId.GetValue(dc.State); var hookValue = Hook.GetValue(dc.State); return(await gitHubClient.Organization.Hook.Edit(orgValue, (Int32)hookIdValue, hookValue).ConfigureAwait(false)); } throw new ArgumentNullException("Required [org,hookId,hook] arguments missing for GitHubClient.Organization.Hook.Edit"); }
/// <inheritdoc/> protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken)) { if (Org != null && Options != null) { var orgValue = Org.GetValue(dc.State); var optionsValue = Options.GetValue(dc.State); return(await gitHubClient.Organization.Team.GetAll(orgValue, optionsValue).ConfigureAwait(false)); } if (Org != null) { var orgValue = Org.GetValue(dc.State); return(await gitHubClient.Organization.Team.GetAll(orgValue).ConfigureAwait(false)); } throw new ArgumentNullException("Required [org] arguments missing for GitHubClient.Organization.Team.GetAll"); }