0

I have a release pipeline in Azure DevOps that requires approval from a Senior Developer. I want to be able to customize the email notification that goes out requiring them to approve the release.

Is there some way I can do this? To be able to use Python to achieve this would be ideal.

Minura Punchihewa
  • 1,498
  • 1
  • 12
  • 35

2 Answers2

0
  • As per the local environment you have direct options to enable notifications in your project settings. Below is the image to achieve that.

enter image description here

SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15
  • I understand that notifications can be approved through here, but what I want to do is customize the actual email notification that goes out. For example, I want to add an URL to the email. This does not address that. – Minura Punchihewa Aug 18 '22 at 05:40
0

what I want to do is customize the actual email notification that goes out. For example, I want to add an URL to the email. 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.

As a workaround, we could add a stage at first of the release pipeline, and add the powershell task to sent the e-mail:

Send simple email in Azure DevOps using PowerShell (without any smtp server)

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? Do not want to use "Notifications Module"

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • 1
    This would result in two emails though, right? The email with the message I want to include and then the approval email from DevOps. This actually my existing solution. What I want to do is get rid of one email. – Minura Punchihewa Aug 19 '22 at 06:22
  • @MinuraPunchihewa, You could disable the approval email from DevOps by disable the subscription for approval in the project setting. – Leo Liu Aug 19 '22 at 06:39
  • 1
    I could have other release pipelines that require approvals as well. Is it possible to disable approval notifications for a particular release pipeline for all users? – Minura Punchihewa Aug 19 '22 at 06:43
  • @MinuraPunchihewa, Yes, you could just disable the default subscription "Deployment approval pending". – Leo Liu Aug 19 '22 at 06:55
  • But, this will disable approvals for all pipelines in the subscription, right? I don't want that. This will need to apply only to this particular pipeline. – Minura Punchihewa Aug 19 '22 at 07:41