mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
Another round of db.DefaultContext
refactor (#27103)
Part of #27065 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
@ -195,7 +195,7 @@ func CreateNewTag(ctx context.Context, doer *user_model.User, repo *repo_model.R
|
||||
// addAttachmentUUIDs accept a slice of new created attachments' uuids which will be reassigned release_id as the created release
|
||||
// delAttachmentUUIDs accept a slice of attachments' uuids which will be deleted from the release
|
||||
// editAttachments accept a map of attachment uuid to new attachment name which will be updated with attachments.
|
||||
func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_model.Release,
|
||||
func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, rel *repo_model.Release,
|
||||
addAttachmentUUIDs, delAttachmentUUIDs []string, editAttachments map[string]string,
|
||||
) error {
|
||||
if rel.ID == 0 {
|
||||
@ -207,7 +207,7 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod
|
||||
}
|
||||
rel.LowerTagName = strings.ToLower(rel.TagName)
|
||||
|
||||
ctx, committer, err := db.TxContext(db.DefaultContext)
|
||||
ctx, committer, err := db.TxContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user