Skip to content

Fix getting ref for lightweight tags - #477

Merged
taylorsilva merged 1 commit into
masterfrom
fix-lightweight-tags
Jul 8, 2026
Merged

Fix getting ref for lightweight tags#477
taylorsilva merged 1 commit into
masterfrom
fix-lightweight-tags

Conversation

@taylorsilva

@taylorsilva taylorsilva commented Jul 8, 2026

Copy link
Copy Markdown
Member

There was an issue in our jq query where the ref would be empty for repos that used lightweight tags. Example of what this looked like in ci:

image

I incorrectly thought the // worked on empty strings, but it actually only works on values null and false. Adding map(select(. != "")) turns the empty string into a null value, making our // in the next part of the query work as desired.

I only noticed this issue with lightweight tags, so added lightweight tags to the existing tests. Also added checks to ensure ref is never empty when emitting versions.

There was an issue in our jq query where the `ref` would be empty for
repos that used lightweight tags.

I incorrectly thought the `//` worked on empty strings, but it actually
only works on values null and false. Adding `map(select(. != ""))` turns
the empty string into a null value, making our `//` in the next part of
the query work as desired.

I only noticed this issue with lightweight tags, so added lightweight
tags to the existing tests. Also added checks to ensure `ref` is never
empty when emitting versions.

Signed-off-by: Taylor Silva <dev@taydev.net>
@taylorsilva
taylorsilva requested a review from a team July 8, 2026 20:14
@taylorsilva
taylorsilva merged commit 2e2c1f3 into master Jul 8, 2026
2 checks passed
@taylorsilva
taylorsilva deleted the fix-lightweight-tags branch July 8, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant