AzureDevOpsAliases.

AzureDevOpsWorkItemUsingAzurePipelinesOAuthToken(ICakeContext, int) Method

Summary

Gets the description of a specific work item the access token provided by Azure Pipelines. Make sure the build has the 'Allow Scripts to access OAuth token' option enabled.
Assembly
Cake.AzureDevOps.dll
Namespace
Cake.AzureDevOps
Containing Type
AzureDevOpsAliases

Syntax

public static AzureDevOpsWorkItem AzureDevOpsWorkItemUsingAzurePipelinesOAuthToken(this ICakeContext context, int workItemId)

Examples

Get an Azure DevOps work item:

var workItem =
    AzureDevOpsBuildUsingAzurePipelinesOAuthToken(42);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
workItemId int ID of the work item.

Return Value

Type Description
AzureDevOpsWorkItem Description of the work item. Returns null if work item could not be found and ThrowExceptionIfWorkItemCouldNotBeFound is set to false.