public static void AzureDevOpsVotePullRequest(
            this ICakeContext context,
            AzureDevOpsPullRequestSettings settings,
            AzureDevOpsPullRequestVote vote)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));

            new AzureDevOpsPullRequest(context.Log, settings, new GitClientFactory()).Vote(vote);
        }
        public static void AzureDevOpsSetPullRequestStatus(
            this ICakeContext context,
            AzureDevOpsPullRequestSettings settings,
            AzureDevOpsPullRequestStatus status)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));
            status.NotNull(nameof(status));

            new AzureDevOpsPullRequest(context.Log, settings, new GitClientFactory()).SetStatus(status);
        }
Exemple #3
0
        public static IEnumerable <AzureDevOpsCommit> AzureDevOpsGetPullRequestCommits(
            this ICakeContext context,
            AzureDevOpsPullRequestSettings settings)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));

            return
                (new AzureDevOpsPullRequest(context.Log, settings, new GitClientFactory())
                 .GetCommits());
        }
        public static void AzureDevOpsAddCommentToPullRequest(
            this ICakeContext context,
            AzureDevOpsPullRequestSettings settings,
            string comment)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));
            comment.NotNullOrWhiteSpace(nameof(comment));

            new AzureDevOpsPullRequest(context.Log, settings, new GitClientFactory())
            .CreateComment(comment);
        }
        public static AzureDevOpsPullRequest AzureDevOpsPullRequest(
            this ICakeContext context,
            AzureDevOpsPullRequestSettings settings)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));

            var pullRequest = new AzureDevOpsPullRequest(context.Log, settings, new GitClientFactory());

            if (pullRequest.HasPullRequestLoaded)
            {
                return(pullRequest);
            }

            return(null);
        }