forgejo/routers/web
Earl Warren 9e6f722f94 fix: only send Forgejo Actions notifications to one user (#8227)
- If the run was attributed to a system user (which is the case for scheduled runs for instance), ignore it and fallback to the mail of the owner. System users may have email addresses, but they are not to be used.
- If the owner is a system user or an organization with no email associated with it, do nothing.
- If a user with an email exists, check if they did not disable notifications and send the email.

Refs: https://codeberg.org/forgejo/forgejo/issues/8187
Refs: https://codeberg.org/forgejo/forgejo/issues/8233

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.

### Documentation

- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] I do not want this change to show in the release notes.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8227
Reviewed-by: Christopher Besch <mail@chris-besch.com>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-06-21 12:15:38 +02:00
..
admin feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
auth fix: remove trailing slash from the issuer in oauth claims (#8028) 2025-06-10 20:46:17 +02:00
devtest chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
events chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
explore fix(ui): Improve chronological sorting of user (#7596) 2025-05-02 20:33:57 +02:00
feed Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
healthcheck chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
misc fix: return the correct agit type in ssh_info (#8025) 2025-06-02 09:21:49 +02:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org blob: use NewTruncatedReader for markdown 2025-06-20 20:43:10 +02:00
repo fix: only send Forgejo Actions notifications to one user (#8227) 2025-06-21 12:15:38 +02:00
shared fix: show membership of limited orgs 2025-06-06 19:33:26 +02:00
user blob: use NewTruncatedReader for markdown 2025-06-20 20:43:10 +02:00
base.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
githttp.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
goget.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
home.go ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
metrics.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
nodeinfo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
swagger_json.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
web.go Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
webfinger.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00