forked from kevadesu/forgejo
Backport #27103 by @JakobDev Part of #27065 Co-authored-by: JakobDev <jakobdev@gmx.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
parent
597b04fe2f
commit
fc7d3f7315
109 changed files with 353 additions and 306 deletions
|
@ -185,7 +185,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 {
|
||||
|
@ -197,7 +197,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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue