How to change recipient of GitHub Action failure notification email?

Viewed 1031

If a GitHub repo has a GitHub action added, and that action fails, GitHub sends an automated email indicating that failure. How can I change the recipient of that email?

Background

My GitHub profile has my personal email address set as the primary email address, and my work email address added as a secondary. In my work's GitHub account I've created a new GitHub repo--one with a GitHub action that executes whenever a push occurs to the GitHub repo. GitHub settings are such that, when a push occurs and the action fails, GitHub sends an automated email indicating the failure. The problem is, when I push from my Git user (using my work email address) and the GitHub action fails, that email is sent to my personal email address, rather than my work email address. Both my work and I would like to keep all work-related email out of my personal email, if possible.

I'm not sure if the email is being sent to me because I created the repo, because I created the action, or because I initiated the push.

I realize I can additional recipients to this notification email, but that's not what I want right now.


Possible Solutions

  • Ideally, I'd like to change the recipient of these emails to any recipient(s) I want. Is that possible? If so, how would I approach that?

  • As a fallback, is there a way to simply change the recipient of these emails to my work email address, rather than my personal email address?


What I've Tried So Far

  • I've asked GitHub support about this, but haven't received a reply.
  • Check Settings: In my work repo, I don't seem to have permissions to check the settings of this repo. But I created a similar repo in my personal GitHub account, and was able to check its settings. There is a ‘Notifications’ section and an ‘Actions’ section. But nothing in either allows me to do what I want.

Thanks.

1 Answers

This worked for me

In your Github profile notification settings: https://github.com/settings/notifications

You can set the default notification email to one of those which are configured on your account.

Here is an example

Example

There is also an interesting section in your case: Choosing where your organization’s email notifications are sent, in the Github Documentation that give more details about this.

Related