Dry runs of release-pr and prerelease edit the checkout

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
bun, git, typescript
领域
devtools, release

调研方向

从 src/release-pr/index.ts 第 162–166 行附近和 src/prerelease/index.ts 第 97 行附近的 dry-run 检查开始;追踪此前运行的 checkout、版本更新和 release 脚本。确定 dry run 应如何避免修改 checkout,或者 README 是否应引导用户使用一次性克隆。完成标准是:本地 dry run 不会留下对 checkout 的更改,或者 README 清楚地记录了变通方法。

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

描述

bug
Issue description

The README recommends trying an action locally as a dry run (INPUT_DRY_RUN=true bun dist/release-pr/index.js). Before it checks dry, release-pr runs git checkout -B <release branch>, rewrites every selected package.json version and runs each package's release script, which writes its CHANGELOG.md (src/release-pr/index.ts#L162-L166). prerelease also calls setVersion before its dry check (src/prerelease/index.ts#L97).

So a local dry run leaves the developer on a new branch with modified files. Traced, not run (to keep the checkout clean). In CI it doesn't matter.

Expected: a dry run doesn't touch the checkout, or the README says to run it in a throwaway clone.

Found by a read-only audit of main at 435a16b (first done at 046494f; no src/ file changed in between), report audits/actions-2026-11-11.md in the workspace repo.

Code sample
await checkoutBranch(branch);
await applyVersions(group, plans);

let url = "";
if (dry) {
  info(`[DRY] Would push "${branch}" and open the PR "${message}"`);
Versions
  • @nanoforge-dev/actions 3.3.0 (main at 435a16b)
  • Bun 1.3.14
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

435a16b

主要语言
TypeScript
星标
0
派生
0
平均合并
15 小时 51 分钟
30 天内合并 PR
21

环境准备

从这里开始

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

NanoForge-dev/actions 的其他 Issue

查看 NanoForge-dev/actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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