Example #1
0
        /// <inheritdoc/>
        protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (RepositoryId != null && InvitationId != null)
            {
                var repositoryIdValue = RepositoryId.GetValue(dc.State);
                var invitationIdValue = InvitationId.GetValue(dc.State);
                return(await gitHubClient.Repository.Invitation.Delete((Int64)repositoryIdValue, (Int32)invitationIdValue).ConfigureAwait(false));
            }

            throw new ArgumentNullException("Required [repositoryId,invitationId] arguments missing for GitHubClient.Repository.Invitation.Delete");
        }
        /// <inheritdoc/>
        protected override async Task <object> CallGitHubApi(DialogContext dc, Octokit.GitHubClient gitHubClient, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (RepositoryId != null && NewProject != null)
            {
                var repositoryIdValue = RepositoryId.GetValue(dc.State);
                var newProjectValue   = NewProject.GetValue(dc.State);
                return(await gitHubClient.Repository.Project.CreateForRepository((Int64)repositoryIdValue, newProjectValue).ConfigureAwait(false));
            }

            throw new ArgumentNullException("Required [repositoryId,newProject] arguments missing for GitHubClient.Repository.Project.CreateForRepository");
        }