gitea源码

tag.go 365B

12345678910111213141516
  1. // Copyright 2025 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package gitrepo
  4. import (
  5. "context"
  6. "code.gitea.io/gitea/modules/git"
  7. )
  8. // IsTagExist returns true if given tag exists in the repository.
  9. func IsTagExist(ctx context.Context, repo Repository, name string) bool {
  10. return IsReferenceExist(ctx, repo, git.TagPrefix+name)
  11. }