Repository navigation
git-rg v0.7.0
Create GitHub and GitLab issues with Agent identity. Remote writes remain off by default.
English
Issue creation
git-rg issue create accepts a required title and optional Markdown body through --body, --body-file FILE, or --body-file - for stdin. It supports GitHub, GitLab, and self-managed instances without cloning or resolving a commit. Optional --agent-name, --agent-model, and --agent-run-id parameters append self-reported attribution; the platform author remains the authenticated account.
# Preview locally without credentials or remote requests.
git-rg issue create --dry-run --title "Unexpected result" --body-file issue.md github:OWNER/REPO
# Requires GITRG_WRITE_TOKEN with issue-creation permission.
git-rg issue create --enable-write --title "Unexpected result" --body-file issue.md \
--agent-name "Review Agent" --agent-run-id run-123 github:OWNER/REPOUse gitlab:GROUP/PROJECT for GitLab. Both git-rg issue --help and git-rg issue create --help include examples and explain permissions, attribution, and retry behavior. Successful creation returns NDJSON with the issue number, URL, state, and result.complete=true; preview returns a separate preview event. Titles are limited to 200 UTF-8 bytes; bodies, including attribution, to 64 KiB.
Permissions and recovery
Creation requires both --enable-write and GITRG_WRITE_TOKEN. GitHub fine-grained tokens need Issues: write; code/PR write permissions alone are insufficient. GitLab tokens need API access and a role allowed to create project issues. Read credentials and CLI logins are never substituted for creation credentials. --dry-run takes precedence over --enable-write and does not check remote existence or permissions.
Issue creation is neither retried automatically nor deduplicated. A lost or ambiguous response returns issue_creation_uncertain; inspect the repository's issue list before retrying. A run ID is attribution, not an idempotency key. This version creates ordinary issues; labels, assignees, comments, updates, and closing are outside its scope.
Existing search, read, proposal, single-token fallback, exit codes, and NDJSON schema v1 remain compatible. Upgrading does not enable remote writes.
Validation and installation
OrbStack Linux arm64 validation passed full race tests, vet, and build. HTTP fixtures cover GitHub/GitLab requests, nested and self-managed project paths, write gating, body input, Agent attribution, credential separation, timeouts, API rejections, and uncertain responses without replay. CI runs tests and help checks on all six native platforms. The release workflow checks installed issue previews on those platforms and retains live read-only GitHub/GitLab smoke checks. Live issue and commit/PR/MR creation are not part of release smoke tests.
The release provides six archives (Linux/macOS/Windows, amd64/arm64), both installers, and checksums.txt. See Installation, Issue creation, and Agent changes.
中文
创建 issue
新增 git-rg issue create,支持 GitHub、GitLab 及自建实例,无需 clone 或解析 commit。标题必填,Markdown 正文可通过 --body、--body-file FILE 或 --body-file -(stdin)传入。可选的 --agent-name、--agent-model、--agent-run-id 会附加 Agent 自报身份,平台作者仍是凭证对应的账号。
# 本地预览,不需要凭证,也不请求远端。
git-rg issue create --dry-run --title "描述发现的问题" --body-file issue.md github:OWNER/REPO
# 需要具备 issue 创建权限的 GITRG_WRITE_TOKEN。
git-rg issue create --enable-write --title "描述发现的问题" --body-file issue.md \
--agent-name "Review Agent" --agent-run-id run-123 github:OWNER/REPOGitLab 使用 gitlab:GROUP/PROJECT。git-rg issue --help 和 git-rg issue create --help 均提供示例及权限、身份、重试说明。创建成功返回 NDJSON,包含 issue 编号、URL、状态和 result.complete=true;预览返回独立的 preview 事件。标题最多 200 字节,含身份信息的正文最多 64 KiB,均要求 UTF-8。
权限与恢复
写入默认关闭。创建需要同时提供 --enable-write 和 GITRG_WRITE_TOKEN。GitHub fine-grained token 需要 Issues: write,仅有代码或 PR 写权限不够;GitLab token 需要 API 访问权限及允许创建项目 issue 的角色。读取凭证和 CLI 登录不会替代创建凭证。--dry-run 优先于 --enable-write,不检查远端仓库是否存在及当前权限。
创建请求不自动重试、不去重。响应丢失或结果不确定时返回 issue_creation_uncertain,重新执行前应检查远端 issue 列表。运行 ID 只用于身份归属,不是幂等键。本版仅创建普通 issue,不管理标签、负责人、评论、更新或关闭。
既有搜索、读取、提案、单 token 回退、退出码及 NDJSON schema v1 保持兼容。升级不会启用远端写入。
验证与安装
OrbStack Linux arm64 中通过全量 race 测试、vet 和构建。HTTP 模拟测试覆盖 GitHub/GitLab 请求、嵌套路径与自建实例、写入开关、正文输入、Agent 身份、凭证隔离、超时、API 拒绝,以及不确定响应不重放。CI 在六个平台原生运行测试和帮助检查;发布流程验证安装后的 issue 预览,并保留真实 GitHub/GitLab 只读 smoke。发布 smoke 不创建真实 issue 或 commit/PR/MR。
发布包含 Linux/macOS/Windows 的 amd64/arm64 六个 archive、两个安装器和 checksums.txt。详见安装文档、issue 创建说明和Agent 变更文档。
完整变更记录 / Full changelog: v0.6.0...v0.7.0