# 更新日志 ## v4.2.2 * `url-helper.ts` 现在利用众所周知的环境变量,由 @jww3 在 https://github.com/actions/checkout/pull/1941 中贡献 * 扩展 `isGhes` 的单元测试覆盖率,由 @jww3 在 https://github.com/actions/checkout/pull/1946 中贡献 ## v4.2.1 * 如果提供了 commit,则检出其他 refs/*,否则回退到 ref,由 @orhantoy 在 https://github.com/actions/checkout/pull/1924 中贡献 ## v4.2.0 * 添加 Ref 和 Commit 输出,由 @lucacome 在 https://github.com/actions/checkout/pull/1180 中贡献 * 依赖项更新,由 @dependabot 在 https://github.com/actions/checkout/pull/1777 和 https://github.com/actions/checkout/pull/1872 中贡献 ## v4.1.7 * 在 1 个目录中更新次要 npm 依赖项组,共 4 次更新,由 @dependabot 在 https://github.com/actions/checkout/pull/1739 中贡献 * 将 actions/checkout 从 3 升级到 4,由 @dependabot 在 https://github.com/actions/checkout/pull/1697 中贡献 * 按 commit 检出其他 refs/*,由 @orhantoy 在 https://github.com/actions/checkout/pull/1774 中贡献 * 将 actions/checkout 自身的工作流固定到已知、良好、稳定的版本,由 @jww3 在 https://github.com/actions/checkout/pull/1776 中贡献 ## v4.1.6 * 检查平台以适当设置存档扩展名,由 @cory-miller 在 https://github.com/actions/checkout/pull/1732 中贡献 ## v4.1.5 * 更新 NPM 依赖项,由 @cory-miller 在 https://github.com/actions/checkout/pull/1703 中贡献 * 将 github/codeql-action 从 2 升级到 3,由 @dependabot 在 https://github.com/actions/checkout/pull/1694 中贡献 * 将 actions/setup-node 从 1 升级到 4,由 @dependabot 在 https://github.com/actions/checkout/pull/1696 中贡献 * 将 actions/upload-artifact 从 2 升级到 4,由 @dependabot 在 https://github.com/actions/checkout/pull/1695 中贡献 * README:建议将 `user.email` 设置为 `41898282+github-actions[bot]@users.noreply.github.com`,由 @cory-miller 在 https://github.com/actions/checkout/pull/1707 中贡献 ## v4.1.4 - 禁用 `sparse-checkout` 时禁用 `extensions.worktreeConfig`,由 @jww3 在 https://github.com/actions/checkout/pull/1692 中贡献 - 添加 dependabot 配置,由 @cory-miller 在 https://github.com/actions/checkout/pull/1688 中贡献 - 使用 2 次更新更新次要 actions 依赖项组,由 @dependabot 在 https://github.com/actions/checkout/pull/1693 中贡献 - 将 word-wrap 从 1.2.3 升级到 1.2.5,由 @dependabot 在 https://github.com/actions/checkout/pull/1643 中贡献 ## v4.1.3 - 在尝试禁用 `sparse-checkout` 之前检查 git 版本,由 @jww3 在 https://github.com/actions/checkout/pull/1656 中贡献 - 添加 SSH 用户参数,由 @cory-miller 在 https://github.com/actions/checkout/pull/1685 中贡献 - 在 `update-main-version.yml` 中更新 `actions/checkout` 版本,由 @jww3 在 https://github.com/actions/checkout/pull/1650 中贡献 ## v4.1.2 - 修复:当 `sparse-checkout` 选项不存在时禁用稀疏检出,由 @dscho 在 https://github.com/actions/checkout/pull/1598 中贡献 ## v4.1.1 - 修正指向 GitHub 文档的链接,由 @peterbe 在 https://github.com/actions/checkout/pull/1511 中贡献 - 从“新特性”部分链接到发布页面,由 @cory-miller 在 https://github.com/actions/checkout/pull/1514 中贡献 ## v4.1.0 - [添加对部分检出过滤器的支持](https://github.com/actions/checkout/pull/1396) ## v4.0.0 - [支持不带 --progress 选项的获取](https://github.com/actions/checkout/pull/1067) - [升级到 node20](https://github.com/actions/checkout/pull/1436) ## v3.6.0 - [修复:将测试脚本标记为通过 Bash 运行的 Bash'isms](https://github.com/actions/checkout/pull/1377) - [添加选项以在 fetch-depth > 0 时获取标签](https://github.com/actions/checkout/pull/579) ## v3.5.3 - [修复:在自托管运行器上检出失败,当有故障的子模块被签入时](https://github.com/actions/checkout/pull/1196) - [修复 codespell 发现的拼写错误](https://github.com/actions/checkout/pull/1287) - [添加对稀疏检出的支持](https://github.com/actions/checkout/pull/1369) ## v3.5.2 - [修复 GHES 的 api 端点](https://github.com/actions/checkout/pull/1289) ## v3.5.1 - [修复 Windows 上的慢速检出](https://github.com/actions/checkout/pull/1246) ## v3.5.0 * [添加新的 known_hosts 公钥](https://github.com/actions/checkout/pull/1237) ## v3.4.0 - [将 codeql actions 升级到 v2](https://github.com/actions/checkout/pull/1209) - [升级依赖项](https://github.com/actions/checkout/pull/1210) - [升级 @actions/io](https://github.com/actions/checkout/pull/1225) ## v3.3.0 - [通过 exec 函数的回调实现分支列表](https://github.com/actions/checkout/pull/1045) - [明确引用私有检出选项](https://github.com/actions/checkout/pull/1050) - [修复评论中的拼写错误(在 #770 中添加)](https://github.com/actions/checkout/pull/1057) ## v3.2.0 - [添加 GitHub Action 以执行发布](https://github.com/actions/checkout/pull/942) - [修复状态徽章](https://github.com/actions/checkout/pull/967) - [将 datadog/squid 替换为 ubuntu/squid Docker 镜像](https://github.com/actions/checkout/pull/1002) - [在 submoduleForeach 的管道命令周围添加引号](https://github.com/actions/checkout/pull/964) - [将 @actions/io 升级到 1.1.2](https://github.com/actions/checkout/pull/1029) - [升级到版本 3.2.0](https://github.com/actions/checkout/pull/1039) ## v3.1.0 - [使用 @actions/core `saveState` 和 `getState`](https://github.com/actions/checkout/pull/939) - [添加 `github-server-url` 输入](https://github.com/actions/checkout/pull/922) ## v3.0.2 - [添加输入 `set-safe-directory`](https://github.com/actions/checkout/pull/770) ## v3.0.1 - [修复了一个问题,由于新的 git 设置 `safe.directory`,导致在容器作业中无法运行 checkout](https://github.com/actions/checkout/pull/762) - [提升各种 npm 包版本](https://github.com/actions/checkout/pull/744) ## v3.0.0 - [升级到 node 16](https://github.com/actions/checkout/pull/689) ## v2.3.1 - [修复 .wiki 的默认分支解析以及使用 SSH 时的解析](https://github.com/actions/checkout/pull/284) ## v2.3.0 - [回退到默认分支](https://github.com/actions/checkout/pull/278) ## v2.2.0 - [当 fetch-depth=0 时获取所有标签和分支的所有历史记录](https://github.com/actions/checkout/pull/258) ## v2.1.1 - 支持 GHES 的更改([这里](https://github.com/actions/checkout/pull/236) 和 [这里](https://github.com/actions/checkout/pull/248)) ## v2.1.0 - [分组输出](https://github.com/actions/checkout/pull/191) - [支持 GHES alpha 发布的更改](https://github.com/actions/checkout/pull/199) - [为子模块持久化 core.sshCommand](https://github.com/actions/checkout/pull/184) - [添加对 ssh 的支持](https://github.com/actions/checkout/pull/163) - [当不使用 SSH 时,将子模块 SSH URL 转换为 HTTPS](https://github.com/actions/checkout/pull/179) - [添加子模块支持](https://github.com/actions/checkout/pull/157) - [遵循代理设置](https://github.com/actions/checkout/pull/144) - [修复 pr 关闭事件的 ref,当 pr 被合并时](https://github.com/actions/checkout/pull/141) - [修复 git 版本低于 2.22 时检查分离状态的问题](https://github.com/actions/checkout/pull/128) ## v2.0.0 - [不在命令行上传递凭据](https://github.com/actions/checkout/pull/108) - [添加输入 persist-credentials](https://github.com/actions/checkout/pull/107) - [回退到 REST API 下载仓库](https://github.com/actions/checkout/pull/104) ## v2 (beta) - 改进的获取性能 - 默认行为现在仅获取正在检出的 SHA - 脚本认证的 git 命令 - 将 `with.token` 持久化到本地 git 配置 - 使您的脚本可以运行经过身份验证的 git 命令 - 作业后清理移除令牌 - 即将推出:通过将 `with.persist-credentials` 设置为 `false` 来选择退出 - 创建本地分支 - 检出分支时不再是分离的 HEAD - 创建一个带有相应上游分支设置的本地分支 - 改进的布局 - `with.path` 始终相对于 `github.workspace` - 更好地与容器操作对齐,其中 `github.workspace` 被映射进来 - 移除输入 `submodules` ## v1 有关 V1 更新日志,请参阅 [这里](https://github.com/actions/checkout/blob/v1/CHANGELOG.md)