Azure Devops 捕获触发管道的用户`

Dil*_*ilu 3 azure azure-devops

早上,我有一个问题,他们是一种捕获谁触发了管道的方法,当有人在 GITHUB 的主分支中提交时,它会自动发生,在 devops GUI 中我看到下面的内容,我需要捕获该用户 ID,所以如有任何问题,我会发送电子邮件

在此输入图像描述

我尝试使用 Build.QueuedBy、Build.QueuedById、Build.RequestedFor 但我得到了一些值,例如

this is Microsoft.VisualStudio.Services.TFS  variable for the username
this is 00000002-0000-8888-8000-000000000000  ID of the user

Run Code Online (Sandbox Code Playgroud)

但我需要捕获 AMADURO,以便我可以轻松发送电子邮件至 AMADURO@gmail.com,感谢任何帮助,谢谢

Ale*_*AIT 6

尝试Build.RequestedForEmail

查看预定义变量