AzureDevOpsPullRequest Class

Summary

Class for writing issues to Azure DevOps pull requests.
Assembly
Cake.AzureDevOps.dll
Namespace
Cake.AzureDevOps.Repos.PullRequest
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["AzureDevOpsPullRequest"] class Type type-node

Syntax

public sealed class AzureDevOpsPullRequest

Constructors

Properties

Name Value Summary
CodeReviewId int
Gets the ID of the code review. Returns 0 if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
CollectionName string
Gets the name of the Azure DevOps collection.
CollectionUrl Uri
Gets the URL for accessing the web portal of the Azure DevOps collection.
HasPullRequestLoaded bool
Gets a value indicating whether a pull request has been successfully loaded.
IsDraft Nullable<bool>
Gets if the pull request is in draft mode. Returns NotSet if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
LastSourceCommitId string
Gets the commit at the head of the source branch at the time of the last pull request merge. Returns System.String.Empty if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
LastTargetCommitId string
Gets the commit at the head of the target branch at the time of the last pull request merge. Returns System.String.Empty if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
ProjectName string
Gets the name of the Azure DevOps project.
PullRequestId int
Gets the ID of the pull request. Returns 0 if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
PullRequestStatus AzureDevOpsPullRequestState
Gets the status of the pull request. Returns NotSet if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
RepositoryId Guid
Gets the ID of the repository. Returns System.Guid.Empty if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.
RepositoryName string
Gets the name of the Git repository.
ServerUrl Uri
Gets the Url of the Azure DevOps server.
SourceRefName string
Gets the name of the source branch from the pull request.
TargetRefName string
Gets the name of the target branch. Returns System.String.Empty if no pull request could be found and ThrowExceptionIfPullRequestCouldNotBeFound is set to false.

Methods

Name Value Summary
ActivateCommentThread(int) void
Sets the pull request comment thread to Microsoft.TeamFoundation.SourceControl.WebApi.CommentThreadStatus.Active.
CloseCommentThread(int) void
Sets the pull request comment thread to Microsoft.TeamFoundation.SourceControl.WebApi.CommentThreadStatus.Closed.
Create(ICakeLog, AzureDevOpsCreatePullRequestSettings) AzureDevOpsPullRequest
Create a pull request.
static
CreateComment(string, FilePath, int, int) AzureDevOpsPullRequestCommentThread
Creates a new comment thread for the given file and position.
CreateComment(string) AzureDevOpsPullRequestCommentThread
Creates a new comment thread with a single comment in the pull request.
CreateCommentThread(AzureDevOpsPullRequestCommentThread) AzureDevOpsPullRequestCommentThread
Creates a new comment thread in the pull request.
DeleteComment(AzureDevOpsComment) void
Deletes the comment.
DeleteComment(int, int) void
Deletes the comment in the given thread.
GetCommentThreads() IEnumerable<AzureDevOpsPullRequestCommentThread>
Gets the pull request comment threads.
GetCommits() IEnumerable<AzureDevOpsCommit>
Gets the commits contained in the pull request.
GetIterationChanges(int) IEnumerable<AzureDevOpsPullRequestIterationChange>
Gets all the pull request changes of the given iteration.
GetLatestIterationId() int
Gets the Id of the latest pull request iteration.
GetModifiedFiles() IEnumerable<FilePath>
Gets the files modified by the pull request.
ResolveCommentThread(int) void
Sets the pull request comment thread status to Microsoft.TeamFoundation.SourceControl.WebApi.CommentThreadStatus.Fixed.
SetStatus(AzureDevOpsPullRequestStatus) void
Sets a status on the pull request.
UpdateComment(AzureDevOpsComment) AzureDevOpsComment
Updates the comment.
Vote(AzureDevOpsPullRequestVote) void
Votes for the pull request.

Extension Methods

Name Value Summary
Dump<AzureDevOpsPullRequest>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<AzureDevOpsPullRequest>(AzureDevOpsPullRequest[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<AzureDevOpsPullRequest>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<AzureDevOpsPullRequest>(string) void
Requires the Cake.Issues addin
ThrowIfNull<AzureDevOpsPullRequest>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<AzureDevOpsPullRequest>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin