Untrack warm-state JSON and keep it out of the worktree
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 80/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, javascript, node.js
- 领域
- tooling
调研方向
先运行 git ls-files scripts 确认两个状态文件都已被跟踪,然后阅读 scripts/warm.mjs(大约第 32 行和第 139-140 行)和 scripts/warm-og.mjs(大约第 13 行和第 44-45 行)中的写入/更新位置,看看路径是在哪里选择的。添加一个统一的 state 目录辅助函数,遵循环境变量覆盖,并默认使用 ${XDG_STATE_HOME:-$HOME/.local/state}/gitone,更新 .gitignore,并用 git rm --cached 取消跟踪这两个文件。完成意味着运行两个 warmer 后 git status --porcelain 是干净的,并且该位置已在 CONTRIBUTING.md 或 scripts/ 下记录。
由索引模型根据 Issue 内容生成。
描述
Current behavior
The warmers write their progress into tracked files inside the repository. Every run changes the worktree, creates review noise and can cause merge conflicts.
git status after a run shows:
M scripts/.og-warm-state.json
M scripts/.warm-state.json
Cause
.gitignorelistsscripts/.warm-state.json, but the file is already tracked; gitignore does not untrack it.scripts/.og-warm-state.jsonis not ignored at all.scripts/warm.mjs:32andscripts/warm-og.mjs:13write state in place;scripts/warm.mjs:139-140andscripts/warm-og.mjs:44-45update it.
Expected behavior
Warm state is local runtime data, not source. Move it outside the repository, for example under ${XDG_STATE_HOME:-$HOME/.local/state}/gitone, or under an ignored scripts/.state/ directory. Untrack both files with git rm --cached; add both names to .gitignore; allow an override through an environment variable for CI or multiple checkouts.
Acceptance
git ls-filesno longer lists either state file.git status --porcelainis clean after a warm run.- A fresh checkout can run both warmers without creating tracked changes.
- The state location is documented in
scripts/orCONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 7
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LangerSword/gitone 的其他 Issue
-
accessibility bug help wanted
难度 2/5 1-3 小时 新手友好度 78/100
LangerSword/gitone#6 ·
-
bug help wanted
难度 3/5 1-2 天 新手友好度 72/100
LangerSword/gitone#5 ·
-
bug help wanted
难度 3/5 半天 新手友好度 72/100
LangerSword/gitone#4 ·
-
bug help wanted security
难度 4/5 3-5 天 新手友好度 35/100
LangerSword/gitone#3 ·
-
Add a /health endpoint可能已有人在做 @LangerSword 今天认领。 未关闭good first issue
难度 1/5 1-3 小时 新手友好度 45/100
LangerSword/gitone#2 · 1 条评论 ·
查看 LangerSword/gitone 的全部 Issue
相似的 Issue
-
MCP tool results drop structuredContent when text is only a summary可能已有人在做 @Pankaj-bit361 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
inblockio/siwx-oidc-matrix-server#101 ·
维护者通常 1 天内回复
-
status:needs-triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pingdotgg/t3code#42253 · 1 条评论 ·
维护者通常 1 天内回复