Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Confusing content: evaluates the expression `hash "package-lock.json"` to derive the final key `npm-d5ea0750`

未关闭 适合新手
#46,499 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
86/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, typescript
领域
documentation

调研方向

阅读 issue 中链接的依赖缓存文章,并将其中的示例与表达式文章中 hashFiles() 的文档进行比较。确认显示的最终键是否与文档所述输出一致,然后修改容易误导的措辞或示例。两篇文章对哈希表达式及其输出的描述保持一致时,即为完成。

由索引模型根据 Issue 内容生成。

描述

actions builder persona content
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching

What part(s) of the article would you like to see updated?

The document says:

For example, you can create a key using an expression that calculates the hash of an npm package-lock.json file. So, when the dependencies that make up the package-lock.json file change, the cache key changes and a new cache is automatically created.

npm-${{ hashFiles('package-lock.json') }}

GitHub evaluates the expression hash "package-lock.json" to derive the final key.

npm-d5ea0750

However, https://docs.github.com/en/actions/reference/workflows-and-actions/expressions does not document any hash expression, and my tests show that hashFiles() produces the full SHA256 value per https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#hashfiles, not the abbreviated string like d5ea0750.

Additional information

No response

主要语言
TypeScript
星标
21.1k
派生
69.3k
平均合并
12 小时 11 分钟
30 天内合并 PR
90

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/docs 的其他 Issue

查看 github/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。