AzureDevOpsAliases.

AzureDevOpsSetPullRequestStatus(ICakeContext, AzureDevOpsPullRequestSettings, AzureDevOpsPullRequestStatus) Method

Summary

Sets a status on an Azure DevOps pull request using the specified settings.
Assembly
Cake.AzureDevOps.dll
Namespace
Cake.AzureDevOps
Containing Type
AzureDevOpsAliases

Syntax

public static void AzureDevOpsSetPullRequestStatus(this ICakeContext context, AzureDevOpsPullRequestSettings settings, AzureDevOpsPullRequestStatus status)

Examples

Set a custom status on the pull request:

 var pullRequestSettings =
     new AzureDevOpsPullRequestSettings(
         new Uri("http://myserver:8080/defaultcollection/myproject/_git/myrepository"),
         "refs/heads/feature/myfeature",
         AzureDevOpsAuthenticationNtlm());

 var pullRequstStatus =
     new AzureDevOpsPullRequestStatus("MyStatus")
     {
         Genre = "MyGenre",
         State = AzureDevOpsPullRequestStatusState.Succeeded,
         Description = "My custom status is successful"
     };

 AzureDevOpsSetPullRequestStatus(
     pullRequestSettings,
     pullRequstStatus);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute
CakeNamespaceImportAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings AzureDevOpsPullRequestSettings Settings for accessing the pull request.
status AzureDevOpsPullRequestStatus Description of the status which should be set.

Return Value

Type Description
void