Make sure to retrieve the correct tag info when there is no commit attached to the tag
This commit is contained in:
parent
bd5cbba03e
commit
85d87a3b37
@ -227,6 +227,7 @@ class RepositoryFetcher {
|
|||||||
repository(owner: "thelounge", name: $repositoryName) {
|
repository(owner: "thelounge", name: $repositoryName) {
|
||||||
ref(qualifiedName: $tag) {
|
ref(qualifiedName: $tag) {
|
||||||
tag: target {
|
tag: target {
|
||||||
|
oid
|
||||||
... on Tag {
|
... on Tag {
|
||||||
commit: target {
|
commit: target {
|
||||||
oid
|
oid
|
||||||
@ -237,7 +238,7 @@ class RepositoryFetcher {
|
|||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const data = await this.fetch(tagQuery, {tag});
|
const data = await this.fetch(tagQuery, {tag});
|
||||||
return data.repository.ref.tag.commit;
|
return data.repository.ref.tag.commit || data.repository.ref.tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns an array of annotated commits that have been made on the master
|
// Returns an array of annotated commits that have been made on the master
|
||||||
|
Loading…
Reference in New Issue
Block a user