Get all tags on master branch only

I’m trying to pull all the tags on the master branch only. How can I filter this down to just the master branch?

query getTagsForRepo($repoName: String!, $repoOwner: String!) {
	repository(name: $repoName, owner: $repoOwner) {
 		id
		name
		description
		refs(refPrefix: "refs/tags/", last: 100, after: null) {
			edges {
				cursor
				node {
					name
					target {
						__typename
						oid
					}
				}
			}
		}
	}
}
{
  "repoOwner": "someUser",
  "repoName": "test"
}
1 Like

What do you mean by “[a tag is] on the master branch”?
A tag points to a commit. Branches don’t come into it, per se.

Generally speaking, you can certainly check whether the tagged commit is contained in master:HEAD. Not sure if that’s what you want, or how to do that with the syntax you’re using there.

I would recommend you rethink how you’re using tags. Seems to me you’re attaching semantics Git isn’t built for.

How can I validate that the tag is on master:HEAD? or only filter tags on master:HEAD?

And thank you for the reply.