用途:该技能用于辅助使用 Azure DevOps CLI,在自动化与脚本场景中生成常用命令,覆盖认证、流水线、仓库、工作项和制品等操作。
主要能力:支持生成常用 CLI 命令;认证配置(PAT、OAuth);流水线操作(运行、取消、查看构建与日志);仓库操作(克隆、创建仓库、创建与合并 PR、添加评审人);工作项操作(创建、更新、WIQL 查询、添加关联);制品操作(Feed 列表、通用包上传与下载)。
使用方式:先安装扩展并配置默认组织与项目,再设置 PAT 环境变量。 az extension add --name azure-devops az devops configure --defaults organization=https://dev.azure.com/myorg project=MyProject export AZURE_DEVOPS_EXT_PAT=your-personal-access-token 随后按需调用命令,例如:az pipelines list --output table、az pipelines run --name "MyPipeline" --branch main、az repos pr create --source-branch feature/new-feature --target-branch main --title "Add new feature" --description "Implements feature XYZ"、az boards work-item create --title "Implement login feature" --type "User Story" --assigned-to user@example.com --fields "System.Tags=authentication;security"。
适用场景:CI/CD 流水线批量操作、失败构建重试、PR 自动审批、工作项批量维护、制品发布与下载等脚本化任务。
限制:资料未提供具体版本兼容性、权限要求、配额或错误处理细节;示例中的组织、项目、分支、ID 等需按实际环境替换。版本信息为 1.0.0。