3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2026-01-14 15:46:17 +00:00
checkout/src
eric sciple de0fac2e45
Fix tag handling: preserve annotations and explicit fetch-tags (#2356)
This PR fixes several issues with tag handling in the checkout action:

1. fetch-tags: true now works (fixes #1471)
   - Tags refspec is now included in getRefSpec() when fetchTags=true
   - Previously tags were only fetched during a separate fetch that was
     overwritten by the main fetch

2. Tag checkout preserves annotations (fixes #290)
   - Tags are fetched via refspec (+refs/tags/*:refs/tags/*) instead of
     --tags flag
   - This fetches the actual tag objects, preserving annotations

3. Tag checkout with fetch-tags: true no longer fails (fixes #1467)
   - When checking out a tag with fetchTags=true, only the wildcard
     refspec is used (specific tag refspec is redundant)

Changes:
- src/ref-helper.ts: getRefSpec() now accepts fetchTags parameter and
  prepends tags refspec when true
- src/git-command-manager.ts: fetch() simplified to always use --no-tags,
  tags are fetched explicitly via refspec
- src/git-source-provider.ts: passes fetchTags to getRefSpec()
- Added E2E test for fetch-tags option

Related #1471, #1467, #290
2026-01-09 13:42:23 -06:00
..
misc Update all references from v5 and v4 to v6 (#2314) 2025-11-23 19:32:55 -06:00
fs-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00
git-auth-helper.ts Add worktree support for persist-credentials includeIf (#2327) 2025-12-01 19:53:23 -06:00
git-command-manager.ts Fix tag handling: preserve annotations and explicit fetch-tags (#2356) 2026-01-09 13:42:23 -06:00
git-directory-helper.ts Fix typos found by codespell (#1287) 2023-04-19 16:55:10 +02:00
git-source-provider.ts Fix tag handling: preserve annotations and explicit fetch-tags (#2356) 2026-01-09 13:42:23 -06:00
git-source-settings.ts Add SSH user parameter (#1685) 2024-04-18 15:29:55 -04:00
git-version.ts Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
github-api-helper.ts Check platform for extension (#1732) 2024-05-16 13:40:36 -04:00
input-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00
main.ts Add Ref and Commit outputs (#1180) 2024-09-05 11:57:13 -04:00
ref-helper.ts Fix tag handling: preserve annotations and explicit fetch-tags (#2356) 2026-01-09 13:42:23 -06:00
regexp-helper.ts add support for submodules (#173) 2020-03-05 14:21:59 -05:00
retry-helper.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
state-helper.ts Fix comment typos (that got added in #770) (#1057) 2022-12-28 17:19:08 -05:00
url-helper.ts url-helper.ts now leverages well-known environment variables. (#1941) 2024-10-18 10:07:17 +02:00
workflow-context-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00