-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Send email on Workflow Run Success/Failure #34982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
replace #33601 |
This comment was marked as resolved.
This comment was marked as resolved.
outdatedAnd by reading the history discussions: I think the concern is not addressed? It looks right, the concerns in "Actions - send Email on Success/Failure #33601" should all be addressed. 🙏 |
Actually we should never trust existing code, there are bugs and bad-smells. If you just copy-paste existing code, then there will be more bugs and bad-smells. |
Will explain more "bad smells" in old code that I have made changes to:
Actually I can tolerate the nits in code (not serious bugs) if the PR was reviewed and merged by others, or I missed some of them. While if I am reviewing or writing code, I will always do my best to avoid the bad smells. |
@lunny |
* giteaofficial/main: Send email on Workflow Run Success/Failure (go-gitea#34982) [skip ci] Updated translations via Crowdin Replace `poetry` with `uv` (go-gitea#35084) nix flake update (go-gitea#35085) Use monospace font in PR command line instructions (go-gitea#35074) Add gitignore rules to exclude LLM instruction files (go-gitea#35076) [skip ci] Updated translations via Crowdin Fix form property assignment edge case (go-gitea#35073) Improve submodule relative path handling (go-gitea#35056) Fixed all grammatical errors in locale_en-US.ini (go-gitea#35053) UI: add hover background to table rows in user and repo admin page (go-gitea#35072)
Yes, it is in 1.25, great thanks to @NorthRealm and reviewers 🎉 You can use it by the nightly build: |
Thank you so much for this!! 🥳🎉🧡 |
@NorthRealm |
@inxcts |
I also set this variable to true and restarted Gitea. When an action run fails, I still do net any emails. I still something is still missing. |
@inxcts I'm pretty sure that's the key. Manually tested on local instance (localhost) and it's working as intended. Do you have a valid email address in your account? Is your mailbox provider putting gitea emails into spam folder? |
The spam folder is empty. In the mailer section of the app.ini, I have put an email address that is not in use by any Gitea user, it is just used as the email account that Gitea should use. In the "FROM" variable, I have put the email address from my main account. When navigating to the settings page, the mailer seems to work. When typing an email address and clicking the Test button, the email is sent to my account (the same that should be used for the actions). |
@inxcts Enable Gitea trace log and see if anything like
The above is my (dummy) mailer config. You usually don't "put the email address from your main account." |
When I commit something and the action fails, I now get the email. The problem seems to be that the job is scheduled.
Is it possible to receive emails here or run the job with my user? |
@inxcts I am not familiar with how Gitea determines trigger user. I looked at code base and did not find anywhere clear that logs an existing user as trigger user for a scheduled task. You get the email probably because of push trigger and you become the trigger user. |
@inxcts Please notice this feature will be released in v1.25 |
@lunny I know that this is a 1.25 feature, I am running the latest dev build. @NorthRealm I think for scheduled builds, the repository owner should receive the emails(just like GitHub does), otherwise no one really knows that actions fail. |
FWIW, I'm in agreement with inxcts. I'm more interested in receiving notifications for scheduled actions when they fail vs push actions, as with push actions, I'm actively doing something and know to check. Having to check the results manually every morning is a chore I wish to avoid. Just my two cents. That said, I really appreciate the work and feature and am very thankful for the project. |
My experience is different. The user who has changed the schedule trigger yaml most recently is the trigger of the run and email recipient on GitHub Actions, here is Gitea Actions the trigger and has no real user as target. In very rare cases this is the repository owner for multi user projects. There were discussions on how bad GitHubs behavior is, so it might make sense to actually use the repository owner for all non deliverable workflow failure notifications. Some people might prefer, a repo setting to send all schedule failures to a custom user/team members / receive other event failures of other users as well. Emoji Vote
|
Thanks!! I suggest repository setting for email address, and if it's not set, default to "last changed". |
Closes #23725
/claim #23725