简体   繁体   English

定制 Azure DevOps 批准 Email

[英]Customize Azure DevOps Approval Email

I have a release pipeline in Azure DevOps that requires approval from a Senior Developer.我在 Azure DevOps 中有一个发布管道,需要高级开发人员的批准。 I want to be able to customize the email notification that goes out requiring them to approve the release.我希望能够自定义发出要求他们批准发布的 email 通知。

Is there some way I can do this?有什么办法可以做到这一点吗? To be able to use Python to achieve this would be ideal.能够使用 Python 来实现这一点将是理想的。

  • As per the local environment you have direct options to enable notifications in your project settings.根据本地环境,您可以直接选择在项目设置中启用通知。 Below is the image to achieve that.下面是实现这一目标的图像。

在此处输入图像描述

what I want to do is customize the actual email notification that goes out.我想要做的是自定义发出的实际 email 通知。 For example, I want to add an URL to the email.例如,我想在 email 中添加一个 URL。 This does not address that.这并没有解决这个问题。

If you're customizing the content of your message, I am afraid there is no such way to achieve this at this moment.如果您正在自定义消息的内容,恐怕目前没有这种方法可以实现。

We could only set the notifications for the Approve.我们只能设置 Approve 的通知。

As a workaround, we could add a stage at first of the release pipeline, and add the powershell task to sent the e-mail:作为一种解决方法,我们可以在发布管道的第一个阶段添加一个阶段,并添加 powershell 任务以发送电子邮件:

Send simple email in Azure DevOps using PowerShell (without any smtp server) 在 Azure DevOps 中使用 PowerShell 发送简单的 email(没有任何 Z787C75233B93AA5E45C3F8BE7D)

or we could use the send mail task, you could check another thread for some more details:或者我们可以使用发送邮件任务,您可以查看另一个线程以获取更多详细信息:

Best way to send email notification in an Azure DevOps build pipeline? 在 Azure DevOps 构建管道中发送 email 通知的最佳方式? Do not want to use "Notifications Module" 不想使用“通知模块”

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

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