[PR #4001] [CLOSED] Uniform an abstract notification layer for ui, mail, action, webhook and indexer #17192

Closed
opened 2025-11-02 12:29:03 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4001
Author: @lunny
Created: 5/21/2018
Status: Closed

Base: masterHead: lunny/notification


📝 Commits (10+)

📊 Changes

32 files changed (+1388 additions, -575 deletions)

View changed files

📝 models/action.go (+3 -7)
📝 models/issue.go (+10 -193)
📝 models/issue_assignees.go (+14 -61)
📝 models/issue_assignees_test.go (+3 -3)
📝 models/issue_comment.go (+8 -64)
📝 models/issue_milestone.go (+0 -40)
📝 models/pull.go (+0 -60)
📝 models/release.go (+9 -56)
📝 models/repo.go (+3 -37)
modules/notification/action/action.go (+127 -0)
modules/notification/base/base.go (+41 -0)
modules/notification/indexer/indexer.go (+98 -0)
modules/notification/mail/mail.go (+98 -0)
📝 modules/notification/notification.go (+154 -28)
modules/notification/ui/ui.go (+123 -0)
modules/notification/webhook/webhook.go (+565 -0)
📝 routers/admin/admin.go (+5 -4)
📝 routers/admin/repos.go (+2 -0)
📝 routers/api/v1/repo/fork.go (+3 -0)
📝 routers/api/v1/repo/issue.go (+12 -0)

...and 12 more files

📄 Description

When an event occupied, many notifications will be fired. This PR uniforms them as an abstract notification layer so that you can easily add new events or new receivers and don't change the codes of event occupied.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4001 **Author:** [@lunny](https://github.com/lunny) **Created:** 5/21/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `lunny/notification` --- ### 📝 Commits (10+) - [`46b14ab`](https://github.com/go-gitea/gitea/commit/46b14aba65383242f3333a267ef2e3d265bb9193) uniform an abstract notification layer for ui, mail, action, webhook, indexer - [`57295ab`](https://github.com/go-gitea/gitea/commit/57295abb1be6593a2ae9b473b98f0be66038e864) fix lint - [`f300273`](https://github.com/go-gitea/gitea/commit/f3002734cbe68da1933c3129cc2be1d4667f65e3) fix lint - [`9c02a54`](https://github.com/go-gitea/gitea/commit/9c02a54290fc9650eb4f39235daa730b10b63078) fix imports - [`5f3d1a7`](https://github.com/go-gitea/gitea/commit/5f3d1a7b857eb6db5da7056f8e8c0058b49d9da5) rename to notifier - [`1cf129b`](https://github.com/go-gitea/gitea/commit/1cf129b4453b70aa6a73507a31a44a82c5dd305f) add deletecomment notify - [`76d97a0`](https://github.com/go-gitea/gitea/commit/76d97a03e5efc1c01fd1ce8181cd36ee9e462e21) add more webhooks - [`ef32ba6`](https://github.com/go-gitea/gitea/commit/ef32ba6c969fb0a36f915a0dc87251164b2a4133) more events - [`c81535c`](https://github.com/go-gitea/gitea/commit/c81535cb3c9274f3fd57505983491aadaef58a19) fix tests - [`f3a25d4`](https://github.com/go-gitea/gitea/commit/f3a25d420619bbacee52dff28267b22f71fce8c2) more events ### 📊 Changes **32 files changed** (+1388 additions, -575 deletions) <details> <summary>View changed files</summary> 📝 `models/action.go` (+3 -7) 📝 `models/issue.go` (+10 -193) 📝 `models/issue_assignees.go` (+14 -61) 📝 `models/issue_assignees_test.go` (+3 -3) 📝 `models/issue_comment.go` (+8 -64) 📝 `models/issue_milestone.go` (+0 -40) 📝 `models/pull.go` (+0 -60) 📝 `models/release.go` (+9 -56) 📝 `models/repo.go` (+3 -37) ➕ `modules/notification/action/action.go` (+127 -0) ➕ `modules/notification/base/base.go` (+41 -0) ➕ `modules/notification/indexer/indexer.go` (+98 -0) ➕ `modules/notification/mail/mail.go` (+98 -0) 📝 `modules/notification/notification.go` (+154 -28) ➕ `modules/notification/ui/ui.go` (+123 -0) ➕ `modules/notification/webhook/webhook.go` (+565 -0) 📝 `routers/admin/admin.go` (+5 -4) 📝 `routers/admin/repos.go` (+2 -0) 📝 `routers/api/v1/repo/fork.go` (+3 -0) 📝 `routers/api/v1/repo/issue.go` (+12 -0) _...and 12 more files_ </details> ### 📄 Description When an event occupied, many notifications will be fired. This PR uniforms them as an abstract notification layer so that you can easily add new events or new receivers and don't change the codes of event occupied. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:29:03 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17192