Repository navigation
新机器人工作目录初始化时写入 .gitignore,技能与 MCP 配置随仓库提交 - #133
Merged
Merged
Conversation
- Workspace.init 在非 Git 仓库且没有 .gitignore 的目录写一份默认 .gitignore - 只排除所有权标记、.env*、.claude/settings.local.json;.agents、.claude、.mcp.json、skills-lock.json 不忽略 - 已是 Git 仓库或已有 .gitignore 的目录不动 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
新机器人的工作目录由 AI 员工自行
git init与提交。希望.agents/、.claude/、.mcp.json都进入 Git,只排除本机文件。改动
Workspace.init在新目录(不是 Git 仓库且没有.gitignore)写一份默认.gitignore,只排除:.coreman-workspace.json.env、.env.*.claude/settings.local.json.agents/、.claude/(含skills链接)、.mcp.json、skills-lock.json不忽略.gitignore的目录原样保留;已有工作区不补写注意:
.mcp.json的 headers/env 可能含令牌,会随仓库提交,AI 员工的仓库需保持私有。测试
.gitignore的忽略结果(git check-ignore)、已有.gitignore不覆盖;Git 仓库目录不写入tests/unit/test_runtime_workspace.py、tests/api/test_bot_workspace.py38 条通过🤖 Generated with Claude Code