From 4060ffcfd1ebca62eeaec8834ed2ba660fa6309c Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Wed, 28 Dec 2022 23:06:52 +0000 Subject: [PATCH] Move notification package to services. --- routers/api/packages/conan/conan.go | 2 +- routers/api/v1/repo/issue.go | 2 +- routers/api/v1/repo/migrate.go | 2 +- routers/api/v1/repo/pull.go | 2 +- routers/api/v1/repo/wiki.go | 2 +- routers/init.go | 2 +- routers/web/repo/pull.go | 2 +- routers/web/repo/wiki.go | 2 +- services/agit/agit.go | 2 +- services/issue/assignee.go | 2 +- services/issue/comments.go | 2 +- services/issue/content.go | 2 +- services/issue/issue.go | 2 +- services/issue/label.go | 2 +- services/issue/milestone.go | 2 +- services/issue/status.go | 2 +- services/mirror/mirror_pull.go | 2 +- .../notification/action/action.go | 2 +- .../notification/action/action_test.go | 0 .../notification/base/notifier.go | 0 {modules => services}/notification/base/null.go | 0 .../notification/indexer/indexer.go | 2 +- {modules => services}/notification/mail/mail.go | 2 +- .../notification/mirror/mirror.go | 2 +- {modules => services}/notification/notification.go | 14 +++++++------- {modules => services}/notification/ui/ui.go | 2 +- .../notification/webhook/webhook.go | 2 +- services/packages/packages.go | 2 +- services/pull/check.go | 2 +- services/pull/merge.go | 2 +- services/pull/pull.go | 2 +- services/pull/review.go | 2 +- services/release/release.go | 2 +- services/repository/adopt.go | 2 +- services/repository/branch.go | 2 +- services/repository/fork.go | 2 +- services/repository/push.go | 2 +- services/repository/repository.go | 2 +- services/repository/template.go | 2 +- services/repository/transfer.go | 2 +- services/repository/transfer_test.go | 4 ++-- services/task/migrate.go | 2 +- 42 files changed, 46 insertions(+), 46 deletions(-) rename {modules => services}/notification/action/action.go (99%) rename {modules => services}/notification/action/action_test.go (100%) rename {modules => services}/notification/base/notifier.go (100%) rename {modules => services}/notification/base/null.go (100%) rename {modules => services}/notification/indexer/indexer.go (99%) rename {modules => services}/notification/mail/mail.go (99%) rename {modules => services}/notification/mirror/mirror.go (96%) rename {modules => services}/notification/notification.go (97%) rename {modules => services}/notification/ui/ui.go (99%) rename {modules => services}/notification/webhook/webhook.go (99%) diff --git a/routers/api/packages/conan/conan.go b/routers/api/packages/conan/conan.go index d538cc7d397db..6c60605f74594 100644 --- a/routers/api/packages/conan/conan.go +++ b/routers/api/packages/conan/conan.go @@ -17,11 +17,11 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" packages_module "code.gitea.io/gitea/modules/packages" conan_module "code.gitea.io/gitea/modules/packages/conan" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/routers/api/packages/helper" + "code.gitea.io/gitea/services/notification" packages_service "code.gitea.io/gitea/services/packages" ) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 30dc7a68326ca..fba3f421e719f 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -21,7 +21,6 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" issue_indexer "code.gitea.io/gitea/modules/indexer/issues" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" @@ -29,6 +28,7 @@ import ( "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" ) // SearchIssues searches for issues across the repositories that the user has access to diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go index 35516ff58f364..ce3c2b02fbc10 100644 --- a/routers/api/v1/repo/migrate.go +++ b/routers/api/v1/repo/migrate.go @@ -22,7 +22,6 @@ import ( "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" base "code.gitea.io/gitea/modules/migration" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -30,6 +29,7 @@ import ( "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/migrations" + "code.gitea.io/gitea/services/notification" ) // Migrate migrate remote git repository to gitea diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index ed23b267f2871..38bf20d904771 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -24,7 +24,6 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" @@ -35,6 +34,7 @@ import ( "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/gitdiff" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" ) diff --git a/routers/api/v1/repo/wiki.go b/routers/api/v1/repo/wiki.go index 0b55a9b2818fd..9c0e817dcff0b 100644 --- a/routers/api/v1/repo/wiki.go +++ b/routers/api/v1/repo/wiki.go @@ -13,11 +13,11 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/notification" wiki_service "code.gitea.io/gitea/services/wiki" ) diff --git a/routers/init.go b/routers/init.go index 670191debc664..9de852598c56a 100644 --- a/routers/init.go +++ b/routers/init.go @@ -20,7 +20,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/external" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/ssh" "code.gitea.io/gitea/modules/storage" @@ -43,6 +42,7 @@ import ( markup_service "code.gitea.io/gitea/services/markup" repo_migrations "code.gitea.io/gitea/services/migrations" mirror_service "code.gitea.io/gitea/services/mirror" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" "code.gitea.io/gitea/services/repository/archiver" diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 8929a183ee7ec..0bce359f3cbea 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -31,7 +31,6 @@ import ( "code.gitea.io/gitea/modules/git" issue_template "code.gitea.io/gitea/modules/issue/template" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/upload" @@ -43,6 +42,7 @@ import ( "code.gitea.io/gitea/services/automerge" "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/gitdiff" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" ) diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go index b50a4be802043..cfafc4b072722 100644 --- a/routers/web/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -24,13 +24,13 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/common" "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/notification" wiki_service "code.gitea.io/gitea/services/wiki" ) diff --git a/services/agit/agit.go b/services/agit/agit.go index b61cb6f3f5692..5a9fda1ffb584 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -14,8 +14,8 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/private" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" ) diff --git a/services/issue/assignee.go b/services/issue/assignee.go index e5e1456c3f12e..7b3767fb5f500 100644 --- a/services/issue/assignee.go +++ b/services/issue/assignee.go @@ -14,7 +14,7 @@ import ( "code.gitea.io/gitea/models/unit" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/services/notification" ) // DeleteNotPassedAssignee deletes all assignees who aren't passed via the "assignees" array diff --git a/services/issue/comments.go b/services/issue/comments.go index 46c0daf70a336..12756d4e6bbbb 100644 --- a/services/issue/comments.go +++ b/services/issue/comments.go @@ -11,8 +11,8 @@ import ( issues_model "code.gitea.io/gitea/models/issues" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/services/notification" ) // CreateComment creates comment of issue or commit. diff --git a/services/issue/content.go b/services/issue/content.go index 819ac3f20f6ba..525af07b6651b 100644 --- a/services/issue/content.go +++ b/services/issue/content.go @@ -7,7 +7,7 @@ import ( "code.gitea.io/gitea/models/db" issues_model "code.gitea.io/gitea/models/issues" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/services/notification" ) // ChangeContent changes issue content, as the given user. diff --git a/services/issue/issue.go b/services/issue/issue.go index b91ee4fc18b07..dc22373896acc 100644 --- a/services/issue/issue.go +++ b/services/issue/issue.go @@ -15,8 +15,8 @@ import ( system_model "code.gitea.io/gitea/models/system" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/services/notification" ) // NewIssue creates new issue with labels for repository. diff --git a/services/issue/label.go b/services/issue/label.go index c18abbfcda3d2..724150905b8f6 100644 --- a/services/issue/label.go +++ b/services/issue/label.go @@ -8,7 +8,7 @@ import ( issues_model "code.gitea.io/gitea/models/issues" access_model "code.gitea.io/gitea/models/perm/access" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/services/notification" ) // ClearLabels clears all of an issue's labels diff --git a/services/issue/milestone.go b/services/issue/milestone.go index a9be8bd887871..543c1d41e7831 100644 --- a/services/issue/milestone.go +++ b/services/issue/milestone.go @@ -10,7 +10,7 @@ import ( "code.gitea.io/gitea/models/db" issues_model "code.gitea.io/gitea/models/issues" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/services/notification" ) func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) error { diff --git a/services/issue/status.go b/services/issue/status.go index 782ce0bd9675c..0be08c4e48409 100644 --- a/services/issue/status.go +++ b/services/issue/status.go @@ -10,7 +10,7 @@ import ( issues_model "code.gitea.io/gitea/models/issues" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/services/notification" ) // ChangeStatus changes issue status to open or closed. diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go index 98e8d122a5dfa..fad2f947c8949 100644 --- a/services/mirror/mirror_pull.go +++ b/services/mirror/mirror_pull.go @@ -16,12 +16,12 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/process" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" ) // gitShortEmptySha Git short empty SHA diff --git a/modules/notification/action/action.go b/services/notification/action/action.go similarity index 99% rename from modules/notification/action/action.go rename to services/notification/action/action.go index 2f882c2cb86e6..e955f45712d9d 100644 --- a/modules/notification/action/action.go +++ b/services/notification/action/action.go @@ -15,9 +15,9 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification/base" ) type actionNotifier struct { diff --git a/modules/notification/action/action_test.go b/services/notification/action/action_test.go similarity index 100% rename from modules/notification/action/action_test.go rename to services/notification/action/action_test.go diff --git a/modules/notification/base/notifier.go b/services/notification/base/notifier.go similarity index 100% rename from modules/notification/base/notifier.go rename to services/notification/base/notifier.go diff --git a/modules/notification/base/null.go b/services/notification/base/null.go similarity index 100% rename from modules/notification/base/null.go rename to services/notification/base/null.go diff --git a/modules/notification/indexer/indexer.go b/services/notification/indexer/indexer.go similarity index 99% rename from modules/notification/indexer/indexer.go rename to services/notification/indexer/indexer.go index c67f79d0f2ae5..e0835d9e09171 100644 --- a/modules/notification/indexer/indexer.go +++ b/services/notification/indexer/indexer.go @@ -14,9 +14,9 @@ import ( issue_indexer "code.gitea.io/gitea/modules/indexer/issues" stats_indexer "code.gitea.io/gitea/modules/indexer/stats" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/notification/base" ) type indexerNotifier struct { diff --git a/modules/notification/mail/mail.go b/services/notification/mail/mail.go similarity index 99% rename from modules/notification/mail/mail.go rename to services/notification/mail/mail.go index 18f7fa22aea6e..1a1507022c077 100644 --- a/modules/notification/mail/mail.go +++ b/services/notification/mail/mail.go @@ -12,8 +12,8 @@ import ( repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/services/mailer" + "code.gitea.io/gitea/services/notification/base" ) type mailNotifier struct { diff --git a/modules/notification/mirror/mirror.go b/services/notification/mirror/mirror.go similarity index 96% rename from modules/notification/mirror/mirror.go rename to services/notification/mirror/mirror.go index 426e36ee58bd6..b3cfc8d2cdda4 100644 --- a/modules/notification/mirror/mirror.go +++ b/services/notification/mirror/mirror.go @@ -10,8 +10,8 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" mirror_module "code.gitea.io/gitea/modules/mirror" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/services/notification/base" ) type mirrorNotifier struct { diff --git a/modules/notification/notification.go b/services/notification/notification.go similarity index 97% rename from modules/notification/notification.go rename to services/notification/notification.go index c3e09bb8a9151..fa3a7cbeca977 100644 --- a/modules/notification/notification.go +++ b/services/notification/notification.go @@ -10,15 +10,15 @@ import ( packages_model "code.gitea.io/gitea/models/packages" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification/action" - "code.gitea.io/gitea/modules/notification/base" - "code.gitea.io/gitea/modules/notification/indexer" - "code.gitea.io/gitea/modules/notification/mail" - "code.gitea.io/gitea/modules/notification/mirror" - "code.gitea.io/gitea/modules/notification/ui" - "code.gitea.io/gitea/modules/notification/webhook" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/notification/action" + "code.gitea.io/gitea/services/notification/base" + "code.gitea.io/gitea/services/notification/indexer" + "code.gitea.io/gitea/services/notification/mail" + "code.gitea.io/gitea/services/notification/mirror" + "code.gitea.io/gitea/services/notification/ui" + "code.gitea.io/gitea/services/notification/webhook" ) var notifiers []base.Notifier diff --git a/modules/notification/ui/ui.go b/services/notification/ui/ui.go similarity index 99% rename from modules/notification/ui/ui.go rename to services/notification/ui/ui.go index 63a3ffd199989..b5642fe9b1630 100644 --- a/modules/notification/ui/ui.go +++ b/services/notification/ui/ui.go @@ -14,8 +14,8 @@ import ( "code.gitea.io/gitea/modules/container" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/modules/queue" + "code.gitea.io/gitea/services/notification/base" ) type ( diff --git a/modules/notification/webhook/webhook.go b/services/notification/webhook/webhook.go similarity index 99% rename from modules/notification/webhook/webhook.go rename to services/notification/webhook/webhook.go index cf056f54c1382..c1d6b3149984a 100644 --- a/modules/notification/webhook/webhook.go +++ b/services/notification/webhook/webhook.go @@ -17,10 +17,10 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification/base" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/services/notification/base" webhook_services "code.gitea.io/gitea/services/webhook" ) diff --git a/services/packages/packages.go b/services/packages/packages.go index 49f5a2fac4e21..8340fe8b9c570 100644 --- a/services/packages/packages.go +++ b/services/packages/packages.go @@ -18,10 +18,10 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" packages_module "code.gitea.io/gitea/modules/packages" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" container_service "code.gitea.io/gitea/services/packages/container" ) diff --git a/services/pull/check.go b/services/pull/check.go index 86460cd49cad0..1baff37f2b386 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -22,12 +22,12 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/queue" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" asymkey_service "code.gitea.io/gitea/services/asymkey" + "code.gitea.io/gitea/services/notification" ) // prPatchCheckerQueue represents a queue to handle update pull request tests diff --git a/services/pull/merge.go b/services/pull/merge.go index 41ba45c177620..e52984f0edf0f 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -29,13 +29,13 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/references" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" asymkey_service "code.gitea.io/gitea/services/asymkey" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" ) // GetDefaultMergeMessage returns default message used when merging pull request diff --git a/services/pull/pull.go b/services/pull/pull.go index afb0fa244244b..4383f8e028170 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -24,12 +24,12 @@ import ( "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/process" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/sync" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" ) // TODO: use clustered lock (unique queue? or *abuse* cache) diff --git a/services/pull/review.go b/services/pull/review.go index 67a10d7aad61c..4c9ebc7b15868 100644 --- a/services/pull/review.go +++ b/services/pull/review.go @@ -17,10 +17,10 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" ) // CreateCodeComment creates a comment on the code line diff --git a/services/release/release.go b/services/release/release.go index 13042cd3ac2e8..3f8890f9c4d8e 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -17,11 +17,11 @@ import ( "code.gitea.io/gitea/modules/container" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" ) func createTag(ctx context.Context, gitRepo *git.Repository, rel *repo_model.Release, msg string) (bool, error) { diff --git a/services/repository/adopt.go b/services/repository/adopt.go index 93eeb56456f45..ba270a5da7015 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -17,10 +17,10 @@ import ( "code.gitea.io/gitea/modules/container" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" "github.com/gobwas/glob" ) diff --git a/services/repository/branch.go b/services/repository/branch.go index e5ffbbeb746ef..139d7b6ad39b7 100644 --- a/services/repository/branch.go +++ b/services/repository/branch.go @@ -16,8 +16,8 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" ) diff --git a/services/repository/fork.go b/services/repository/fork.go index ad534be887f1b..6dbfd8c1406eb 100644 --- a/services/repository/fork.go +++ b/services/repository/fork.go @@ -15,10 +15,10 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" ) // ErrForkAlreadyExist represents a "ForkAlreadyExist" kind of error. diff --git a/services/repository/push.go b/services/repository/push.go index f1eedb8e08398..64feb8102c073 100644 --- a/services/repository/push.go +++ b/services/repository/push.go @@ -18,13 +18,13 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/queue" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" ) diff --git a/services/repository/repository.go b/services/repository/repository.go index 3c3e7e82c3f8f..f19919fcebb1a 100644 --- a/services/repository/repository.go +++ b/services/repository/repository.go @@ -17,9 +17,9 @@ import ( "code.gitea.io/gitea/models/unit" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/notification" pull_service "code.gitea.io/gitea/services/pull" ) diff --git a/services/repository/template.go b/services/repository/template.go index 13e0749869396..d37c3a51320a8 100644 --- a/services/repository/template.go +++ b/services/repository/template.go @@ -10,8 +10,8 @@ import ( issues_model "code.gitea.io/gitea/models/issues" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/services/notification" ) // GenerateIssueLabels generates issue labels from a template repository diff --git a/services/repository/transfer.go b/services/repository/transfer.go index f4afb7e2dec28..dee3d11753599 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -15,9 +15,9 @@ import ( repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/sync" + "code.gitea.io/gitea/services/notification" ) // repoWorkingPool represents a working pool to order the parallel changes to the same repository diff --git a/services/repository/transfer_test.go b/services/repository/transfer_test.go index 1299e66be2781..6fc741a98c2da 100644 --- a/services/repository/transfer_test.go +++ b/services/repository/transfer_test.go @@ -14,9 +14,9 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" - "code.gitea.io/gitea/modules/notification" - "code.gitea.io/gitea/modules/notification/action" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/notification" + "code.gitea.io/gitea/services/notification/action" "github.com/stretchr/testify/assert" ) diff --git a/services/task/migrate.go b/services/task/migrate.go index 03d083e596674..de69d79e69aaa 100644 --- a/services/task/migrate.go +++ b/services/task/migrate.go @@ -17,12 +17,12 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/migration" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/migrations" + "code.gitea.io/gitea/services/notification" ) func handleCreateError(owner *user_model.User, err error) error {