@o3r/azure-tools
v15.2.1
Published
Various Azure DevOps tools
Readme
Description
This module provides a tool to comment a Pull Request on Azure.
Comment Azure PR
Usage
yarn dlx -p @o3r/azure-tools o3r-comment-pr <comment> [options]or
npx -p @o3r/azure-tools o3r-comment-pr <comment> [options]The required options include:
- the access token (
--accessToken <accessToken>) - the thread identifier (
--threadIdentifier <threadIdentifier>)
Additionally, the following environment variables must be provided:
SYSTEM_TEAMPROJECT(System.TeamProjectin Azure)BUILD_REPOSITORY_NAME(Build.Repository.Namein Azure)SYSTEM_PULLREQUEST_PULLREQUESTID(must be a number) (System.PullRequest.PullRequestIdin Azure)SYSTEM_TEAMFOUNDATIONCOLLECTIONURI(System.TeamFoundationCollectionUriin Azure)
Arguments
| Argument | Description |
|-----------|------------------------------------|
| comment | Comment to publish on the Azure PR |
Options
| Option | Alias | Value Type | Value Options | Default Value | Description |
|---------------------------------------------------|:-----:|------------|--------------------------------------------------------------------------------------------------|---------------|------------------------------------------------------------------------------------------------------------------|
| --accessToken <accessToken> (Required) | -T | string | | | Access token (Required) |
| --commentStatus <commentStatus> | -s | string | Unknown Active Fixed WontFix Closed ByDesign Pending | Closed | Comment status |
| --mode <mode> | -m | string | Replace Add Skip | Add | Replaces thread if existing Adds a comment to the existing thread Do anything if thread already exists |
| --threadIdentifier <threadIdentifier> | -I | string | | | Thread identifier |
| --help | -h | | | | Output usage information |
Example
yarn dlx -p @o3r/azure-tools o3r-comment-pr "[Deployed app]($(url))" -s Closed -I app-link -m Replace -T $(System.AccessToken)or
npx -p @o3r/azure-tools o3r-comment-pr "[Deployed app]($(url))" -s Closed -I app-link -m Replace -T $(System.AccessToken)