diff options
author | JakobDev <jakobdev@gmx.de> | 2023-10-11 06:24:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-11 04:24:07 +0000 |
commit | ebe803e514acb4eedc884226be2489ee6b4acd28 (patch) | |
tree | 3f4d38f8267142dcd0e8df7d76cd4fe04c47b85e /services/issue/label.go | |
parent | 50166d1f7c6df41c79561b094e29c9698c0000d5 (diff) | |
download | gitea-ebe803e514acb4eedc884226be2489ee6b4acd28.tar.gz gitea-ebe803e514acb4eedc884226be2489ee6b4acd28.zip |
Penultimate round of `db.DefaultContext` refactor (#27414)
Part of #27065
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/issue/label.go')
-rw-r--r-- | services/issue/label.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/issue/label.go b/services/issue/label.go index 91f0308d9f..6b8070d8aa 100644 --- a/services/issue/label.go +++ b/services/issue/label.go @@ -15,7 +15,7 @@ import ( // ClearLabels clears all of an issue's labels func ClearLabels(ctx context.Context, issue *issues_model.Issue, doer *user_model.User) error { - if err := issues_model.ClearIssueLabels(issue, doer); err != nil { + if err := issues_model.ClearIssueLabels(ctx, issue, doer); err != nil { return err } @@ -26,7 +26,7 @@ func ClearLabels(ctx context.Context, issue *issues_model.Issue, doer *user_mode // AddLabel adds a new label to the issue. func AddLabel(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, label *issues_model.Label) error { - if err := issues_model.NewIssueLabel(issue, label, doer); err != nil { + if err := issues_model.NewIssueLabel(ctx, issue, label, doer); err != nil { return err } @@ -36,7 +36,7 @@ func AddLabel(ctx context.Context, issue *issues_model.Issue, doer *user_model.U // AddLabels adds a list of new labels to the issue. func AddLabels(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, labels []*issues_model.Label) error { - if err := issues_model.NewIssueLabels(issue, labels, doer); err != nil { + if err := issues_model.NewIssueLabels(ctx, issue, labels, doer); err != nil { return err } @@ -86,7 +86,7 @@ func ReplaceLabels(ctx context.Context, issue *issues_model.Issue, doer *user_mo return err } - if err := issues_model.ReplaceIssueLabels(issue, labels, doer); err != nil { + if err := issues_model.ReplaceIssueLabels(ctx, issue, labels, doer); err != nil { return err } |