Query for a single tag #1499
|
Hello everyone, is it possible to query for the existence of a single tag, with or without an associated release? So far I've seen methods to list all tags (which may be expensive in repos with too many tags, also don't need all the data per tag), and a method to find a release by tag (there might not be a release yet associated with said tag). At the moment I'm using the option to list all tags then iterate til I find the tag or not. |
Answered by
bitwiseman
Aug 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@aalmiray
You can query for the existence of a
ref.github-api/src/main/java/org/kohsuke/github/GHRepository.java
Line 1884 in cf27f0c
repository.getRef("tags/" + tagName). This removes the need to iterate.