1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 06:34:25 +00:00

Merge branch 'main' into allow-force-push-protected-branches

This commit is contained in:
Henry Goodman 2024-02-02 18:09:09 +11:00 committed by GitHub
commit a06a3e9e5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 10 deletions

View File

@ -291,15 +291,13 @@ func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repo
} }
} }
if !isCreated {
notify_service.UpdateRelease(gitRepo.Ctx, doer, rel)
return nil
}
if !rel.IsDraft { if !rel.IsDraft {
if !isCreated {
notify_service.UpdateRelease(gitRepo.Ctx, doer, rel)
return nil
}
notify_service.NewRelease(gitRepo.Ctx, rel) notify_service.NewRelease(gitRepo.Ctx, rel)
} }
return nil return nil
} }
@ -368,8 +366,9 @@ func DeleteReleaseByID(ctx context.Context, repo *repo_model.Repository, rel *re
} }
} }
notify_service.DeleteRelease(ctx, doer, rel) if !rel.IsDraft {
notify_service.DeleteRelease(ctx, doer, rel)
}
return nil return nil
} }

View File

@ -9,11 +9,11 @@
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div> <div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
<div class="gt-df gt-mt-3"> <div class="gt-df gt-mt-3">
<div class="gt-p-2">{{svg "octicon-git-branch"}}</div> <div class="gt-p-2">{{svg "octicon-git-branch"}}</div>
<div class="branch-area flex-text-block gt-f1"></div> <div class="branch-area flex-text-block gt-fw gt-f1"></div>
</div> </div>
<div class="gt-df gt-mt-3"> <div class="gt-df gt-mt-3">
<div class="gt-p-2">{{svg "octicon-tag"}}</div> <div class="gt-p-2">{{svg "octicon-tag"}}</div>
<div class="tag-area flex-text-block gt-f1"></div> <div class="tag-area flex-text-block gt-fw gt-f1"></div>
</div> </div>
</div> </div>
</div> </div>