术语' pullrequest.pullrequestnumber'不被认为是CMDLET,功能,脚本文件或
我正在尝试获取拉动请求ID,但请继续 术语“ system.pullrequest.pullrequestnumber”不被认为是cmdlet的名称 我还尝试了system.pullrequest.pullrequestnumber,但是
使用Azure Devops Pipleine yaml文件,我的错误是我的错误,而仓库位于github中
steps:
- powershell: |
#write-host $(System.PullRequest.PullRequestId)
write-host $(System.PullRequest.PullRequestNumber)
I am trying to get the Pull Request ID but keep getting
The term 'System.PullRequest.PullRequestNumber' is not recognized as a name of a cmdlet
I have also tried System.PullRequest.PullRequestNumber but same error
Im using Azure devops pipleine yaml file and the repo is in Github
steps:
- powershell: |
#write-host $(System.PullRequest.PullRequestId)
write-host $(System.PullRequest.PullRequestNumber)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否添加了
pr
触发器(请参阅文档)?我已经在GitHub创建了一个仓库,这是我的示例管道(也在GitHub中)
,我从Azure Devops配置了管道,当我创建针对主分支的PR时,它将成功运行:

Did you add the
pr
trigger (see documentation)?I've created a repo in github and here is my sample pipeline (In Github as well)
I've configured the pipeline from Azure Devops and when I create a PR targeting the main branch, it runs successfully:
