mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 18:24:14 +01:00
Backport #29008 by @yp05327 Fix #27157 Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
5ac41026f9
commit
8def405047
1 changed files with 7 additions and 8 deletions
|
@ -278,15 +278,13 @@ func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !rel.IsDraft {
|
||||||
if !isCreated {
|
if !isCreated {
|
||||||
notify_service.UpdateRelease(gitRepo.Ctx, doer, rel)
|
notify_service.UpdateRelease(gitRepo.Ctx, doer, rel)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if !rel.IsDraft {
|
|
||||||
notify_service.NewRelease(gitRepo.Ctx, rel)
|
notify_service.NewRelease(gitRepo.Ctx, rel)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +349,8 @@ func DeleteReleaseByID(ctx context.Context, repo *repo_model.Repository, rel *re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !rel.IsDraft {
|
||||||
notify_service.DeleteRelease(ctx, doer, rel)
|
notify_service.DeleteRelease(ctx, doer, rel)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue