mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-12 17:10:55 +00:00
Co-authored-by: bircni <bircni@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
18 lines
397 B
Go
18 lines
397 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"context"
|
|
|
|
audit_model "gitea.dev/models/audit"
|
|
user_model "gitea.dev/models/user"
|
|
"gitea.dev/services/audit"
|
|
)
|
|
|
|
func cliAuditContext(ctx context.Context) context.Context {
|
|
ctx = audit.WithOrigin(ctx, audit_model.OriginCLI)
|
|
return audit.WithDoer(ctx, user_model.NewCLIUser())
|
|
}
|