Reputation: 968
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
Thanks.
Upvotes: 4
Views: 4321
Reputation: 23000
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.
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.
Upvotes: 5