Azure DevOps REST API,如何允许Azure函数在DevOps项目中创建工作界面?

发布于 2025-01-25 00:38:49 字数 347 浏览 5 评论 0原文

我正在创建一个计划触发的Azure功能,该功能每天将运行一次测试。如果在运行期间任何测试失败,我希望它能在Azure DevOps项目上创建一个错误,该项目包括失败测试的日志。

我知道我可以创建一个PAT,以便它可以使用DevOps Rest API进行身份验证,但我不喜欢它的弊端:

  • 它可以最大程度地有效期为1年,我需要记住将其延长其到期期限的
  • 每个错误,例如这将使我作为创造者

编辑: 我发现我可以使用MS流 - 有一个可以创建工作源的DevOps连接器,但它仍然是让我作为Workitem的创建者的缺点,但这并不是很痛苦...

仍然很高兴了解其他选择。 。

I'm creating a schedule-triggered Azure Function which will run tests once a day. If during the run any test fails, I want it to create a bug on a Azure DevOps project which includes a log of the failed tests.

I know I could create a PAT so that it can authenticates with the DevOps REST API but I don't like its downsides:

  • it can be valid for 1 year at maximum, I will need to remember to extend its expiration period
  • every bug created like this will have me as its creator

Edit:
I found out I could use a MS Flow - there's a DevOps connector that can create workitems, still it has a downside of having me as workitem's creator but it's not such a pain...

Still would much appreciate to learn about other options...

Is there any better way I can let my Azure Function to create bugs on my DevOps project?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

神回复 2025-02-01 00:38:49

另一种选择是使用Azure Logic应用程序以及Azure函数。

在这里,Azure函数将直接调用Azure Logic应用程序,而Logic应用程序将创建一个错误WorkItem。

请参阅以下 acrats

创建错误。在这里,我们将使用Azure Webhooks来创建错误。

现在,您可以将数据发送到存储帐户,其中逻辑应用使用某些触发器获取数据,然后使用它来创建错误,也可以直接连接到逻辑应用程序。

请参阅以下文章劳拉·科卡林(Laura Kokkarinen)为此。

An alternate option would be the use azure logic app along with azure function.

Here the azure function would directly call a azure logic app and the logic app would create a bug workitem .

Refer the following article by Stefan stranger

On how to create logic app which will create the bug. Here we will be using azure webhooks for the creating of bugs.

Now you can either send the data to a storage account where the logic app using some trigger to get the data and then use it to create bug, or you can directly connect to the logic app .

Refer the following article by Laura KokKarinen for this .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文