This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.AzureDevOps.
Summary
Gets an Azure DevOps pull request using the settings provided by an Azure Pipelines build.
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 AzureDevOpsPullRequest AzureDevOpsPullRequestUsingAzurePipelinesOAuthToken(this ICakeContext context, bool throwException)
Examples
Get a pull request:
var pullRequest =
AzureDevOpsPullRequestUsingAzurePipelinesOAuthToken(false);
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
|
Cake |
|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
throwException | bool | Value indicating whether an exception should be thrown if not running in Azure Pipelines or pull request could not be found. |
Return Value
Type | Description |
---|---|
Azure |
Description of the pull request.
Returns null if pull request could not be found or if not running in an Azure Pipelines build and
throwException is set to false . |