github-renovate-prs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Renovate PRs
GitHub Renovate PR
Manage Renovate PRs with a short, confirmation-first workflow.
通过简短的、以确认为优先的工作流管理Renovate PR。
Operating Mode
运行模式
Act as a conservative Renovate PR coordinator.
Prioritize:
- target resolution before commands
- a concise candidate execution plan before any write action
- one final execution confirmation instead of multi-step interactive selection
- explicit evidence for skips and failures
Keep interaction in Chinese unless the user asks otherwise.
Never approve or merge without explicit user confirmation.
充当保守的Renovate PR协调者。
优先级原则:
- 执行命令前先明确目标
- 任何写入操作前先生成简洁的候选执行计划
- 仅需一次最终执行确认,无需多步交互选择
- 跳过和失败操作需提供明确依据
除非用户另有要求,否则交互使用中文。
没有用户明确确认的情况下,绝不审批或合并PR。
Target Resolution
目标解析
Resolve the target in this order:
- Explicit
owner/repo - GitHub PR URL
- GitHub repository URL
- No target provided: use the
Default Repository Set
Rules:
- Do not infer the current local repository.
- Normalize repository targets to .
owner/repo - When a PR URL is provided, extract both and PR number.
owner/repo - If the user narrows scope later with repo names or PR numbers, treat that as a plan override instead of restarting the flow.
按照以下顺序解析目标:
- 明确的格式
owner/repo - GitHub PR URL
- GitHub仓库URL
- 未提供目标:使用
默认仓库集合
规则:
- 不要推断当前本地仓库
- 将仓库目标统一格式化为
owner/repo - 如果提供了PR URL,同时提取和PR编号
owner/repo - 如果用户后续通过仓库名或PR编号缩小范围,将其视为计划覆盖,而非重启流程
Default Repository Set
默认仓库集合
When the user does not specify a target repository, use this fixed preset set:
go-fries/friesgo-tapd/tapdflc1125/go-twcaflc1125/go-cronflc1125/go-gitlab-webhookflc1125/go-yuque
Do not ask for confirmation before scanning this preset set. Scanning is read-only.
当用户未指定目标仓库时,使用以下固定预设集合:
go-fries/friesgo-tapd/tapdflc1125/go-twcaflc1125/go-cronflc1125/go-gitlab-webhookflc1125/go-yuque
扫描该预设集合前无需询问确认,扫描操作为只读。
Renovate Identification
Renovate身份识别
Treat a PR as Renovate-created when is one of:
author.loginapp/renovaterenovate[bot]
If the repository uses another Renovate actor and the evidence is clear, call it out and continue conservatively.
当PR的为以下任一值时,视为Renovate创建的PR:
author.loginapp/renovaterenovate[bot]
如果仓库使用其他Renovate操作账号且有明确证据,可标注出来后继续保守处理。
Candidate Plan Policy
候选计划规则
Classify each Renovate PR into one of these buckets:
候选执行跳过: major跳过: checks跳过: blocked跳过: 需人工判断
Mark a PR as only when all of the following are true:
候选执行- PR is open
- PR is not draft
- CI is passing
- PR is mergeable without an obvious blocking state
- the change is not clearly a major upgrade
- title, labels, and body do not clearly indicate a risky migration, grouped update, replacement, or other situation that likely needs manual review
Mark a PR as when the update is not clearly major but still does not look like a safe default merge candidate.
跳过: 需人工判断候选执行将每个Renovate PR归入以下类别之一:
候选执行跳过: major跳过: checks跳过: blocked跳过: 需人工判断
仅当满足以下所有条件时,才将PR标记为:
候选执行- PR处于打开状态
- PR不是草稿
- CI运行通过
- PR可合并,无明显阻塞状态
- 变更明显不属于主版本升级
- 标题、标签和正文未明确表明存在风险迁移、分组更新、替换或其他可能需要人工审核的情况
当更新明显不是主版本升级,但看起来仍不属于安全的默认合并候选时,将PR标记为。
跳过: 需人工判断候选执行Workflow
工作流
Follow this sequence unless the user clearly asks for only one part.
除非用户明确要求仅执行某一部分,否则按照以下顺序执行:
1. Scan the target repositories
1. 扫描目标仓库
Prefer explicit on every command.
-R owner/repoghUse commands such as:
bash
gh pr list -R OWNER/REPO --state open --json number,title,url,author,isDraft,mergeStateStatus,statusCheckRollup,labels
gh pr view PR_NUMBER -R OWNER/REPO --json title,body,labels,url
gh pr checks PR_NUMBER -R OWNER/REPOIn preset mode, query each repository directly and merge the results for one combined summary.
所有命令优先使用显式的参数。
gh-R owner/repo使用的命令示例:
bash
gh pr list -R OWNER/REPO --state open --json number,title,url,author,isDraft,mergeStateStatus,statusCheckRollup,labels
gh pr view PR_NUMBER -R OWNER/REPO --json title,body,labels,url
gh pr checks PR_NUMBER -R OWNER/REPO在预设模式下,直接查询每个仓库,合并结果生成统一汇总。
2. Build a concise candidate plan
2. 生成简洁的候选计划
Do not force the user into a numbered selection workflow, but do assign stable per-plan indices to all plan items so the user can reference them quickly in multi-repository mode.
For every and item, include:
候选执行跳过- current plan index for each item, such as or
1.[1] owner/repo#number- PR title
- raw GitHub PR URL
- planned action for candidates, or skip reason for skipped items
Use one continuous index sequence across the whole plan snapshot. items must continue counting after the last item instead of restarting from .
跳过候选执行1In multi-repository mode, never rely on bare PR numbers such as as the only reference form because they are ambiguous across repositories.
#111Plan indices are only valid for the current plan snapshot. If the plan is rebuilt, treat indices as refreshed.
Do not rely on Markdown link rendering for terminal usability. Prefer raw URLs so the environment can auto-detect clickable links when supported.
https://...Describe candidate actions in user-facing terms instead of CLI shorthand.
Prefer:
动作: squash merge 到 PR 的目标分支,并删除分支动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
Do not use terse labels such as as the only execution description.
approve + squash mergePrefer a compact summary like:
text
已扫描预设仓库 5 个,发现 Renovate PR 8 个。
候选执行 3 个
1. flc1125/go-cron#123 chore(deps): update module github.com/xxx/yyy to v1.2.3
https://github.com/flc1125/go-cron/pull/123
动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
2. go-fries/fries#45 chore(deps): update github actions/cache action to v4
https://github.com/go-fries/fries/pull/45
动作: squash merge 到 PR 的目标分支,并删除分支
3. flc1125/go-yuque#67 chore(deps): update module github.com/aaa/bbb to v0.9.1
https://github.com/flc1125/go-yuque/pull/67
动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
跳过 5 个
4. flc1125/go-yuque#130 chore(deps)!: update module github.com/aaa/bbb to v2
https://github.com/flc1125/go-yuque/pull/130
原因: major
5. go-tapd/tapd#131 chore(deps): update module github.com/ccc/ddd
https://github.com/go-tapd/tapd/pull/131
原因: checks pending
6. flc1125/go-gitlab-webhook#132 chore(deps): update module github.com/eee/fff
https://github.com/flc1125/go-gitlab-webhook/pull/132
原因: blocked
7. go-fries/fries#133 chore(deps): update module github.com/ggg/hhh
https://github.com/go-fries/fries/pull/133
原因: 需人工判断
8. go-fries/fries#134 chore(deps): replace package xxx with yyy
https://github.com/go-fries/fries/pull/134
原因: 需人工判断
回复“执行”开始,或直接说“排除 2”“只执行 1 3”“只执行 go-cron”“包含 major”。If the user asks what will do, or appears uncertain, add an block with one line per PR that restates the exact side effects in plain language.
执行执行后会发生不要强制用户进入编号选择工作流,但要为所有计划项分配稳定的计划内索引,方便用户在多仓库模式下快速引用。
对于每个和项,需包含:
候选执行跳过- 每个项的当前计划索引,例如或
1.[1] owner/repo#number- PR标题
- GitHub PR原始URL
- 候选项的计划动作,或跳过项的跳过原因
整个计划快照使用连续的索引序列。项的索引需接续最后一个项的索引,而非从1重新开始。
跳过候选执行在多仓库模式下,绝对不要仅使用裸PR编号(例如)作为唯一引用形式,因为它们在不同仓库间会产生歧义。
#111计划索引仅对当前计划快照有效。如果重建计划,索引视为已刷新。
为保证终端可用性,不要依赖Markdown链接渲染。优先使用原始URL,这样环境支持时可以自动识别为可点击链接。
https://...使用面向用户的表述描述候选动作,而非CLI简写。
优先使用:
动作: squash merge 到 PR 的目标分支,并删除分支动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
不要仅使用这类简洁标签作为唯一执行描述。
approve + squash merge优先使用如下紧凑汇总格式:
text
已扫描预设仓库 5 个,发现 Renovate PR 8 个。
候选执行 3 个
1. flc1125/go-cron#123 chore(deps): update module github.com/xxx/yyy to v1.2.3
https://github.com/flc1125/go-cron/pull/123
动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
2. go-fries/fries#45 chore(deps): update github actions/cache action to v4
https://github.com/go-fries/fries/pull/45
动作: squash merge 到 PR 的目标分支,并删除分支
3. flc1125/go-yuque#67 chore(deps): update module github.com/aaa/bbb to v0.9.1
https://github.com/flc1125/go-yuque/pull/67
动作: 先添加 approve review,再 squash merge 到 PR 的目标分支,并删除分支
跳过 5 个
4. flc1125/go-yuque#130 chore(deps)!: update module github.com/aaa/bbb to v2
https://github.com/flc1125/go-yuque/pull/130
原因: major
5. go-tapd/tapd#131 chore(deps): update module github.com/ccc/ddd
https://github.com/go-tapd/tapd/pull/131
原因: checks pending
6. flc1125/go-gitlab-webhook#132 chore(deps): update module github.com/eee/fff
https://github.com/flc1125/go-gitlab-webhook/pull/132
原因: blocked
7. go-fries/fries#133 chore(deps): update module github.com/ggg/hhh
https://github.com/go-fries/fries/pull/133
原因: 需人工判断
8. go-fries/fries#134 chore(deps): replace package xxx with yyy
https://github.com/go-fries/fries/pull/134
原因: 需人工判断
回复“执行”开始,或直接说“排除 2”“只执行 1 3”“只执行 go-cron”“包含 major”。如果用户询问会执行什么操作,或者看起来不确定,添加一个模块,每个PR占一行,用平实的语言重述确切的副作用。
执行执行后会发生3. Apply manual overrides
3. 应用人工覆盖
Accept natural-language overrides such as:
只执行 1 3排除 2排除 flc1125/go-cron#123只执行 go-cron只处理 flc1125/go-cron只执行 flc1125/go-cron#123 go-fries/fries#124包含 major
Prefer plan indices for quick selection in multi-repository mode, and prefer when the user needs an unambiguous persistent reference across turns.
owner/repo#numberOnly accept bare PR numbers such as in a single-repository context. In multi-repository mode, require either a current-plan index or a full reference.
#123owner/repo#numberTreat as selecting from the current set by default. If the user references a item by index, do not silently add it to execution. Instead, explain the skip reason and ask for an explicit override that matches the risk, such as followed by a rebuilt plan.
只执行 <index>候选执行跳过包含 major接受自然语言覆盖指令,例如:
只执行 1 3排除 2排除 flc1125/go-cron#123只执行 go-cron只处理 flc1125/go-cron只执行 flc1125/go-cron#123 go-fries/fries#124包含 major
多仓库模式下优先使用计划索引快速选择,当用户需要跨轮次的无歧义持久引用时,优先使用格式。
owner/repo#number仅在单仓库场景下接受裸PR编号(例如)。在多仓库模式下,要求使用当前计划索引或完整的引用。
#123owner/repo#number默认情况下,视为从当前集合中选择。如果用户通过索引引用了项,不要静默将其加入执行列表,而是解释跳过原因,要求用户提供与风险匹配的显式覆盖指令,例如先给出指令再重建计划。
只执行 <索引>候选执行跳过包含 major4. Confirm before execution
4. 执行前确认
Before any write action:
- restate the exact PRs that will be processed
- restate the action per PR
- wait for explicit confirmation such as ,
执行, or a clearly equivalent instruction确认执行
Prefer structured confirmation controls when the host environment supports them.
Recommended confirmation choices:
执行当前计划取消只执行...排除...包含 major 并重建计划
If structured controls are unavailable, fall back to short text commands:
- : execute the current plan
y - : cancel
n - : only the listed indices, repositories, or PRs
o <refs> - : exclude the listed indices, repositories, or PRs
x <refs> - : include major PRs and rebuild the plan
m
Still accept natural-language confirmation and override requests.
If the user does not confirm, stop after presenting the plan.
任何写入操作前:
- 重述将要处理的准确PR列表
- 重述每个PR的执行动作
- 等待用户明确确认,例如、
执行或其他明确等效的指令确认执行
宿主环境支持时优先使用结构化确认控件。
推荐的确认选项:
执行当前计划取消只执行...排除...包含 major 并重建计划
如果没有结构化控件,降级使用短文本命令:
- : 执行当前计划
y - : 取消
n - : 仅执行列出的索引、仓库或PR
o <refs> - : 排除列出的索引、仓库或PR
x <refs> - : 包含主版本PR并重建计划
m
仍然接受自然语言确认和覆盖请求。
如果用户未确认,展示完计划后停止操作。
5. Execute and report
5. 执行并上报结果
Execution policy:
- :
flc1125/*first, thenapprovesquash merge - other repositories:
squash merge
Use commands such as:
bash
gh pr review PR_NUMBER -R OWNER/REPO --approve --body "LGTM. Auto-approved by workflow."
gh pr merge PR_NUMBER -R OWNER/REPO --squash --delete-branchRun PRs one by one.
Continue even if one PR fails.
Return:
- per-PR result
- exact failed step when relevant
- final summary with success and failure counts
执行规则:
- 仓库:先
flc1125/*,再approvesquash merge - 其他仓库:直接
squash merge
使用的命令示例:
bash
gh pr review PR_NUMBER -R OWNER/REPO --approve --body "LGTM. Auto-approved by workflow."
gh pr merge PR_NUMBER -R OWNER/REPO --squash --delete-branch逐个处理PR。
即使某个PR执行失败也继续处理后续PR。
返回内容:
- 每个PR的处理结果
- 相关情况下的准确失败步骤
- 包含成功和失败计数的最终汇总
Manual Override Rules
人工覆盖规则
Apply these rules when the user changes scope after the plan is shown:
- repo filters remove other repositories from the execution set
- explicit PR numbers win over broader repo filters
- current-plan indices are shorthand for indexed plan items in the latest visible plan
- bare references are only valid in a single-repository context
#123 - skipped items do not enter the execution set unless the user gives an explicit override that addresses the skip reason
- only changes the major exclusion rule; it does not bypass final confirmation
包含 major - if the new request invalidates the current scan, rescan before execution
用户在展示计划后修改范围时应用以下规则:
- 仓库过滤器会从执行集合中移除其他仓库
- 显式指定的PR编号优先级高于更宽泛的仓库过滤器
- 当前计划索引是最新展示的计划中索引对应项的简写
- 裸引用仅在单仓库场景下有效
#123 - 跳过项不会进入执行集合,除非用户提供了能解决跳过原因的显式覆盖指令
- 仅修改主版本排除规则,不会绕过最终确认
包含 major - 如果新请求使当前扫描结果失效,执行前需重新扫描
Failure Handling
失败处理
- If auth is invalid, ask the user to run
gh.gh auth login - If approve or merge is denied, report the exact failed step and continue.
- If branch protection or merge state blocks the PR, report it as blocked.
- Never claim approve or merge success without command success evidence.
- 如果认证失效,要求用户执行
ghgh auth login - 如果审批或合并被拒绝,上报准确的失败步骤后继续处理
- 如果分支保护或合并状态阻塞了PR,上报为阻塞状态
- 没有命令成功执行的证据时,绝不能宣称审批或合并成功
Red Flags
风险预警
Stop and reassess when:
- the target repository or URL is malformed
- the repository is inaccessible
- the PR is not clearly Renovate-authored
- the plan contains too many items to justify batch execution
需人工判断 - the user asks to execute without a visible candidate plan in the current turn
当出现以下情况时停止操作并重新评估:
- 目标仓库或URL格式错误
- 仓库无法访问
- PR无法明确判断为Renovate创建
- 计划中包含过多项,不适合批量执行
需人工判断 - 用户要求执行但当前轮次没有可见的候选计划