-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
After #579 was merged and released with v3.6.0, the fetch-tags option was introduced and it's kind of a breaking change for projects that depend on reading tags from the git history. It sets --no-tags in the git fetch command run by this action. I think this new option should have defaulted to true or introduced in v4 instead where it could possibly have had the default false.
Nevertheless, using fetch-tags: true without overriding the default fetch-depth: 1 actually doesn't fetch any tags unless the workflow was triggered by a tag push. So I think it's misleading and should be changed to fetch all tags if fetch-tags is set to true. The change to the git fetch command run by this action would be to append '+refs/tags/*:refs/tags/*' (tagsRefSpec) to the end even though fetch-depth is > 0.
Related issue: #1467
A possible workaround would be to run another git fetch after using this checkout action like in #579 (comment), but that feels hacky.
Seems the author of the #579 PR also discussed supporting my use-case here: #579 (comment)
I'm sure that this added functionality would be very appreciated. Thanks for your consideration!