[PR #662] [MERGED] Simplify event storing with one generic method #12843

Closed
opened 2026-08-05 02:06:49 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/662
Author: @braginini
Created: 1/23/2023
Status: Merged
Merged: 1/24/2023
Merged by: @braginini

Base: mainHead: feature/activity-refactor


📝 Commits (10+)

  • 8d94614 Simplify event storing with one generic method
  • 5525342 Add refactor list item to the PR template
  • db7e373 Fix add peer test
  • 2fa32aa Fix tests that depend on events
  • b800835 Fix tests that depend on events
  • 09b1e7b Fix lint issues
  • 54253b8 Fix account test
  • 37f708e Fix account test
  • 521ad6f Fix activity type when removing user groups
  • 16fcaba Fix activity initiator ID when creating setup key

📊 Changes

11 files changed (+89 additions, -325 deletions)

View changed files

📝 .github/pull_request_template.md (+1 -0)
📝 management/server/account.go (+3 -33)
📝 management/server/account_test.go (+23 -48)
📝 management/server/dns.go (+12 -14)
📝 management/server/event.go (+18 -12)
📝 management/server/group.go (+10 -42)
📝 management/server/peer.go (+2 -16)
📝 management/server/rule.go (+2 -26)
📝 management/server/setupkey.go (+8 -61)
📝 management/server/setupkey_test.go (+4 -22)
📝 management/server/user.go (+6 -51)

📄 Description

Describe your changes

Use the generic storeEvent() funcion to store all activity events.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
  • It is a refactor

🔄 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/netbirdio/netbird/pull/662 **Author:** [@braginini](https://github.com/braginini) **Created:** 1/23/2023 **Status:** ✅ Merged **Merged:** 1/24/2023 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `feature/activity-refactor` --- ### 📝 Commits (10+) - [`8d94614`](https://github.com/netbirdio/netbird/commit/8d94614eb03aedc68c7289b469670e6a18b29919) Simplify event storing with one generic method - [`5525342`](https://github.com/netbirdio/netbird/commit/5525342d31bf21a92132e3ba5e9fc8257603e119) Add refactor list item to the PR template - [`db7e373`](https://github.com/netbirdio/netbird/commit/db7e373a3b5b5f1b0dab3b219250d05552c0fb91) Fix add peer test - [`2fa32aa`](https://github.com/netbirdio/netbird/commit/2fa32aad427457079a3836dcb2ae3b4eb4f6889d) Fix tests that depend on events - [`b800835`](https://github.com/netbirdio/netbird/commit/b80083560a480b96ae6ac5173c34753b988e5e09) Fix tests that depend on events - [`09b1e7b`](https://github.com/netbirdio/netbird/commit/09b1e7bdbc6d1bdc3e3ec4f41f421c001950499c) Fix lint issues - [`54253b8`](https://github.com/netbirdio/netbird/commit/54253b8896409c79fd807df0b962883138a9daba) Fix account test - [`37f708e`](https://github.com/netbirdio/netbird/commit/37f708e96a98f5064c9c081ffaf815b463561a95) Fix account test - [`521ad6f`](https://github.com/netbirdio/netbird/commit/521ad6fc77a7f16431b1be7a60f1a052c20b1720) Fix activity type when removing user groups - [`16fcaba`](https://github.com/netbirdio/netbird/commit/16fcaba8684bc2ecf8793a84615d23d174ef8fea) Fix activity initiator ID when creating setup key ### 📊 Changes **11 files changed** (+89 additions, -325 deletions) <details> <summary>View changed files</summary> 📝 `.github/pull_request_template.md` (+1 -0) 📝 `management/server/account.go` (+3 -33) 📝 `management/server/account_test.go` (+23 -48) 📝 `management/server/dns.go` (+12 -14) 📝 `management/server/event.go` (+18 -12) 📝 `management/server/group.go` (+10 -42) 📝 `management/server/peer.go` (+2 -16) 📝 `management/server/rule.go` (+2 -26) 📝 `management/server/setupkey.go` (+8 -61) 📝 `management/server/setupkey_test.go` (+4 -22) 📝 `management/server/user.go` (+6 -51) </details> ### 📄 Description ## Describe your changes Use the generic `storeEvent()` funcion to store all activity events. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary - [x] It is a refactor --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:49 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12843