简单公关
- 作者仓库星标 15,240
- 许可证 MIT
- 作者仓库 tantivy
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @quickwit-oss · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 6 步:提交更改
使用步骤 3 中的消息进行提交:
第7步:推送并打开PR
推送分支并打开 PR:完成后向用户报告 PR URL。
# Simple PR
Follow these steps to create a simple PR from staged changes:
## Step 1: Check workspace state
Run: `git status`
Verify that all changes have been staged (no unstaged changes). If there are unstaged changes, abort and ask the user to stage their changes first with `git add`.
Also verify that we are on the `main` branch. If not, abort and ask the user to switch to main first.
## Step 2: Ensure main is up to date
Run: `git pull origin main`
This ensures we're working from the latest code.
## Step 3: Review staged changes
Run: `git diff --cached`
Review the staged changes to understand what the PR will contain.
## Step 4: Generate commit message
Based on the staged changes, generate a concise commit message (1-2 sentences) that describes the "why" rather than the "what".
Display the proposed commit message to the user and ask for confirmation before proceeding.
## Step 5: Create a new branch
Get the git username: `git config user.name | tr ' ' '-' | tr '[:upper:]' '[:lower:]'`
Create a short, descriptive branch name based on the changes (e.g., `fix-typo-in-readme`, `add-retry-logic`, `update-deps`).
Create and checkout the branch: `git checkout -b {username}/{short-descriptive-name}`
## Step 6: Commit changes
Commit with the message from step 3:
```
git commit -m "{commit-message}"
```
## Step 7: Push and open a PR
Push the branch and open a PR:
```
git push -u origin {branch-name}
gh pr create --title "{commit-message-title}" --body "{longer-description-if-needed}"
```
Report the PR URL to the user when complete.
章节与文件索引
按说明文件中的顺序排列。
第 1 步:检查工作区状态
第 2 步:确保 main 是最新的
第 3 步:审查分阶段变更
步骤 4:生成提交消息
第5步:创建一个新分支
文件/命令 -> git status · git add · main · git pull origin main · git diff --cached · git config user.name | tr ' ' '-' | tr '[:upper:]' '[:lower:]' · fix-typo-in-readme · add-retry-logic
内容校验值 -> dfd8f06e36a6
当前原文的自动摘译,尚未人工审校。
第 1 步:检查工作区状态
运行:
git status验证所有更改是否已暂存(没有未暂存的更改)。如果存在未暂存的更改,请中止并要求用户首先使用git add暂存其更改。还要验证我们是否位于main分支。如果没有,则中止并要求用户首先切换到主程序。第 2 步:确保 main 是最新的
运行:
git pull origin main这确保我们使用最新的代码。第 3 步:审查分阶段变更
运行:
git diff --cached查看分阶段的更改以了解 PR 将包含的内容。步骤 4:生成提交消息
根据分阶段的更改,生成简洁的提交消息(1-2 句话),描述“原因”而不是“内容”。向用户显示建议的提交消息并在继续之前要求确认。
第5步:创建一个新分支
获取 git 用户名:
git config user.name | tr ' ' '-' | tr '[:upper:]' '[:lower:]'根据更改创建一个简短的描述性分支名称(例如,fix-typo-in-readme、add-retry-logic、update-deps)。创建并签出分支:git checkout -b {username}/{short-descriptive-name}