1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-18 00:47:48 -04:00

fix: use ctx

This commit is contained in:
Jason Song 2023-01-05 14:44:09 +08:00
parent ede9a5f2fa
commit bb3eb5efdc
No known key found for this signature in database
GPG Key ID: 8402EEEE4511A8B5

View File

@ -9,7 +9,6 @@ import (
"strings"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
issues_model "code.gitea.io/gitea/models/issues"
packages_model "code.gitea.io/gitea/models/packages"
access_model "code.gitea.io/gitea/models/perm/access"
@ -105,7 +104,7 @@ func notify(ctx context.Context, input *notifyInput) error {
if unit_model.TypeActions.UnitGlobalDisabled() {
return nil
}
if err := input.Repo.LoadUnits(db.DefaultContext); err != nil {
if err := input.Repo.LoadUnits(ctx); err != nil {
return fmt.Errorf("repo.LoadUnits: %w", err)
} else if !input.Repo.UnitEnabled(ctx, unit_model.TypeActions) {
return nil