-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Move transfer repository and rename repository on a service package and start action notification #8573
Move transfer repository and rename repository on a service package and start action notification #8573
Changes from all commits
90e63f8
9fe835e
6b32640
ce94c31
330cb21
61f3b4b
292c787
2619934
c0845cb
2d50c20
eb1982b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,18 +58,6 @@ func (*NullNotifier) NotifyUpdateComment(doer *models.User, c *models.Comment, o | |
func (*NullNotifier) NotifyDeleteComment(doer *models.User, c *models.Comment) { | ||
} | ||
|
||
// NotifyDeleteRepository places a place holder function | ||
func (*NullNotifier) NotifyDeleteRepository(doer *models.User, repo *models.Repository) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you remove this?
its still used ?!? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just moved them with all repository notifier together. See https://github.com/go-gitea/gitea/pull/8573/files#diff-bfc9d877a9bf8dd799436270bb957949R103 |
||
} | ||
|
||
// NotifyForkRepository places a place holder function | ||
func (*NullNotifier) NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above. |
||
} | ||
|
||
// NotifyRenameRepository places a place holder function | ||
func (*NullNotifier) NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string) { | ||
} | ||
|
||
// NotifyNewRelease places a place holder function | ||
func (*NullNotifier) NotifyNewRelease(rel *models.Release) { | ||
} | ||
|
@@ -111,6 +99,14 @@ func (*NullNotifier) NotifyIssueChangeLabels(doer *models.User, issue *models.Is | |
func (*NullNotifier) NotifyCreateRepository(doer *models.User, u *models.User, repo *models.Repository) { | ||
} | ||
|
||
// NotifyDeleteRepository places a place holder function | ||
func (*NullNotifier) NotifyDeleteRepository(doer *models.User, repo *models.Repository) { | ||
} | ||
|
||
// NotifyForkRepository places a place holder function | ||
func (*NullNotifier) NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) { | ||
} | ||
|
||
// NotifyMigrateRepository places a place holder function | ||
func (*NullNotifier) NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Repository) { | ||
} | ||
|
@@ -126,3 +122,11 @@ func (*NullNotifier) NotifyCreateRef(doer *models.User, repo *models.Repository, | |
// NotifyDeleteRef notifies branch or tag deleteion to notifiers | ||
func (*NullNotifier) NotifyDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string) { | ||
} | ||
|
||
// NotifyRenameRepository places a place holder function | ||
func (*NullNotifier) NotifyRenameRepository(doer *models.User, repo *models.Repository, oldRepoName string) { | ||
} | ||
|
||
// NotifyTransferRepository places a place holder function | ||
func (*NullNotifier) NotifyTransferRepository(doer *models.User, repo *models.Repository, oldOwnerName string) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny should we use
log.Error
fromcode.gitea.io/gitea/modules/log
in models/* too?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally we should use a standard log library to do that. Maybe code.gitea.io/log . Here we just return the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use modules/log in models - it's used in lots of places already.