简体   繁体   English

Azure DevOps 和逻辑应用程序 - 添加评论

[英]Azure DevOps & Logic Apps - Add comment

I've configured my logic apps to wait for HTTP request, parse JSON and then add the comment to specific work Item with the values from the request.我已将我的逻辑应用程序配置为等待 HTTP 请求,解析 JSON,然后使用请求中的值将注释添加到特定工作项。 Everything works fine, but in work item, the comment is always added with my identity.一切正常,但在工作项目中,评论总是添加我的身份。

How can I change the Identity / User of the new comment to something generic - eg 'auto-bot'?我怎样才能将新评论的身份/用户更改为通用的东西——例如“自动机器人”?

The connection of Flow action is created based on a personal account. Flow action的连接是基于个人账号创建的。 If you configures the Update item action, then the author of the added comment you.如果您配置了更新项目操作,那么添加评论的作者就是您。

You can look for two Options: (preferred option 2)您可以寻找两个选项:(首选选项 2)

  1. Please consider adding tags to Comments, like: Comment by “Auto-Bot” (based on your HTTP request)请考虑在评论中添加标签,例如:“Auto-Bot”评论(根据您的 HTTP 请求)
  2. Create an Service Account User in Azure DevOps and add DevOps connector using service account.在 Azure DevOps 中创建一个服务帐户用户,并使用服务帐户添加 DevOps 连接器。 Then when comment is added to worktime, it would be added by service account and not your name.然后,当评论被添加到工作时间时,它将通过服务帐户而不是您的名字添加。

Reference to create the Service Accounts:参考创建服务帐户:

  1. https://learn.microsoft.com/en-us/azure/devops/server/admin/setup-ad-groups?view=azure-devops-2020#to-create-an-account-to-use-as-a-service-account-in-active-directory https://learn.microsoft.com/en-us/azure/devops/server/admin/setup-ad-groups?view=azure-devops-2020#to-create-an-account-to-use-as-活动目录中的服务帐户
  2. https://azuredevopslabs.com/labs/devopsserver/azureserviceprincipal/ https://azuredevopslabs.com/labs/devopsserver/azureserviceprincipal/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM