github-scanning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitHub Scanning

GitHub 扫描

Search Query Patterns by Intent

按意图划分的搜索查询模式

Issues

Issues

IntentQuery PatternScope
Assigned to you
is:open assignee:USERNAME
All repos
You were @mentioned
is:open mentions:USERNAME
All repos
Authored by you
is:open author:USERNAME
All repos
Specific repo
repo:owner/repo is:open
Single repo
By keyword
{keyword} is:open
All repos
Org-wide
org:ORGNAME is:open
Org repos
Closed (for recap)
is:closed author:USERNAME
All repos
意图查询模式范围
分配给你的
is:open assignee:USERNAME
所有仓库
你被@提及的
is:open mentions:USERNAME
所有仓库
你创建的
is:open author:USERNAME
所有仓库
指定仓库
repo:owner/repo is:open
单个仓库
按关键词
{keyword} is:open
所有仓库
整个组织范围
org:ORGNAME is:open
组织下所有仓库
已关闭(用于复盘)
is:closed author:USERNAME
所有仓库

Pull Requests

Pull Requests

IntentQuery PatternScope
Awaiting your review
review-requested:USERNAME state:open
All repos
Your open PRs
author:USERNAME state:open
All repos
Assigned to you
assignee:USERNAME state:open
All repos
You reviewed, check for updates
reviewed-by:USERNAME state:open
All repos
Specific PRFetch directly with owner, repo, numberSingle repo
Org-wide
org:ORGNAME state:open
Org repos
意图查询模式范围
等待你审核的
review-requested:USERNAME state:open
所有仓库
你创建的未合并PR
author:USERNAME state:open
所有仓库
分配给你的
assignee:USERNAME state:open
所有仓库
你已审核过、需要查看更新的
reviewed-by:USERNAME state:open
所有仓库
指定PR直接通过owner、仓库名、PR编号获取单个仓库
整个组织范围
org:ORGNAME state:open
组织下所有仓库

Discussions

Discussions

IntentAction
You're mentionedSearch with
mentions:USERNAME
You're participatingSearch discussions you've commented on
High activityFilter for 10+ comments in last 24h
Linked to your issuesScan description/comments for issue references
意图操作
你被提及的使用
mentions:USERNAME
搜索
你参与的搜索你评论过的讨论
高活跃度筛选过去24小时内评论数10条以上的内容
关联你的Issues的扫描描述/评论中的Issue引用

Releases

Releases

  • Use
    github_list_releases
    per repo - check for recent, draft, and pre-releases.
  • Cross-reference merged PRs against release notes to identify unreleased work.
  • Compare issue milestones against release schedules to flag upcoming deadline items.
  • 每个仓库使用
    github_list_releases
    接口,检查最新版本、草稿版本和预发布版本。
  • 将已合并的PR与发布说明交叉比对,识别尚未发布的工作内容。
  • 将Issue里程碑与发布计划对比,标记即将到期的事项。

Security

安全

  • Dependabot alerts: critical and high severity across monitored repos.
  • Security advisories affecting dependencies.
  • Pending dependency update PRs from
    dependabot[bot]
    or
    renovate[bot]
    .
  • Dependabot告警:监控所有仓库的严重和高危级别告警。
  • 影响依赖的安全公告。
  • 来自
    dependabot[bot]
    renovate[bot]
    的待处理依赖更新PR。

CI/CD

CI/CD

  • Fetch recent workflow runs - identify failing workflows, long jobs, and flaky tests.
  • For failing workflows: note repo, workflow name, branch, failure reason, and link to run.
  • Cross-reference user's open PRs against CI results.

  • 获取最近的工作流运行记录,识别失败的工作流、长耗时任务和不稳定测试。
  • 针对失败的工作流:记录仓库、工作流名称、分支、失败原因和运行记录链接。
  • 将用户的未合并PR与CI结果交叉比对。

Date Range Handling

日期范围处理

Convert natural language to GitHub query qualifiers:
User SaysGitHub Qualifier
"last week"
created:>YYYY-MM-DD
(7 days ago)
"this month"
created:>YYYY-MM-01
"today"
closed:YYYY-MM-DD
"this week"
closed:>YYYY-MM-DD
(7 days ago)
"between X and Y"
created:X..Y
Not specifiedUse
search.default_window
from preferences (default:
updated:>YYYY-MM-DD
30 days) - mention this assumption
"for current month" (a11y tracker)
milestone:"{Month} {Year}"

将自然语言转换为GitHub查询限定符:
用户表述GitHub限定符
"上周"
created:>YYYY-MM-DD
(7天前)
"本月"
created:>YYYY-MM-01
"今天"
closed:YYYY-MM-DD
"本周"
closed:>YYYY-MM-DD
(7天前)
"X到Y之间"
created:X..Y
未指定使用偏好配置中的
search.default_window
(默认:
updated:>YYYY-MM-DD
30天)- 需要告知用户该默认假设
"当月"(无障碍追踪器)
milestone:"{Month} {Year}"

Scope Narrowing

范围收窄

Add qualifiers to narrow by scope when the user specifies one:
ScopeQualifier
Single repo
repo:owner/name
All org repos
org:orgname
All repos by user
user:username
Everything (default)No qualifier - searches all accessible repos

当用户指定范围时,添加限定符缩小搜索范围:
范围限定符
单个仓库
repo:owner/name
组织下所有仓库
org:orgname
用户的所有仓库
user:username
全部(默认)无限制符 - 搜索所有可访问的仓库

Preferences File Integration

偏好配置文件集成

Read
.github/agents/preferences.md
and apply these filters before and after searching:
  1. repos.discovery
    - determines the default search scope (all / starred / owned / configured / workspace).
  2. repos.include
    - always include these repos even in restricted modes.
  3. repos.exclude
    - skip these repos in all searches.
  4. repos.overrides
    - per-repo settings:
    • track.issues: false
      -> skip issue searches for this repo
    • track.pull_requests: false
      -> skip PR searches for this repo
    • track.discussions: false
      -> skip discussions for this repo
    • track.releases: false
      -> skip release checks for this repo
    • track.security: false
      -> skip security alerts for this repo
    • track.ci: false
      -> skip CI status for this repo
    • labels.include
      /
      labels.exclude
      -> filter results by label
    • paths
      -> only trigger for changes touching these file paths (for PRs/CI)
    • assignees
      -> filter to specific assignees (empty = all)
  5. search.default_window
    - default time range if the user doesn't specify one.
  6. briefing.sections
    - which sections to include in the daily briefing.
  7. accessibility_tracking
    - config for the a11y tracker (repos, labels, channels).

读取
.github/agents/preferences.md
,在搜索前后应用以下过滤规则:
  1. repos.discovery
    - 定义默认搜索范围(全部/标星/自有/已配置/工作区)。
  2. repos.include
    - 即使在受限模式下也始终包含这些仓库。
  3. repos.exclude
    - 所有搜索都跳过这些仓库。
  4. repos.overrides
    - 单仓库配置:
    • track.issues: false
      -> 跳过该仓库的Issue搜索
    • track.pull_requests: false
      -> 跳过该仓库的PR搜索
    • track.discussions: false
      -> 跳过该仓库的讨论搜索
    • track.releases: false
      -> 跳过该仓库的版本发布检查
    • track.security: false
      -> 跳过该仓库的安全告警
    • track.ci: false
      -> 跳过该仓库的CI状态检查
    • labels.include
      /
      labels.exclude
      -> 按标签过滤结果
    • paths
      -> 仅当PR/CI变更触及这些文件路径时触发(适用于PR/CI场景)
    • assignees
      -> 过滤指定经办人(空=全部)
  5. search.default_window
    - 用户未指定时的默认时间范围。
  6. briefing.sections
    - 每日简报中需要包含的板块。
  7. accessibility_tracking
    - 无障碍追踪器配置(仓库、标签、频道)。

Cross-Repo Intelligence

跨仓库智能分析

When results arrive from different repos, look for and surface these patterns:
PatternAction
Cross-repo referencesWhen issue A contains
owner/repo#N
, fetch and surface item N
Shared label patternsGroup items in different repos tagged
P0
together in triage
Related PRs in different reposFlag: "This issue depends on PR #N in repo-B which is still open"
Merged PR not yet releasedNote: "Your PR #N is merged but not in any release yet"
Issue with merged fix PRFlag: "This may be resolved - PR #N that closes it was merged on {date}"
Branch naming patternsGroup PRs in different repos using the same branch naming convention

当从不同仓库返回结果时,查找并呈现以下模式:
模式操作
跨仓库引用当Issue A包含
owner/repo#N
时,获取并展示条目N
共享标签模式分类时将不同仓库中标记为
P0
的条目归为一组
不同仓库中的关联PR标记:"该Issue依赖于repo-B中仍未合并的PR #N"
已合并PR尚未发布标注:"你的PR #N已合并,但尚未纳入任何发布版本"
Issue已有已合并的修复PR标记:"该问题可能已解决 - 对应的关闭PR #N已于{date}合并"
分支命名模式将不同仓库中使用相同分支命名规则的PR归为一组

Parallel Stream Collection Model

并行流采集模型

For agents that collect from multiple data streams, run independent streams simultaneously. Don't serialize operations with no dependencies.
对于从多个数据流采集数据的Agent,可同时运行独立的数据流。无依赖的操作不要串行执行。

Example: Daily Briefing - 3 Parallel Batches

示例:每日简报 - 3个并行批次

Batch 1 - fully independent, run simultaneously:
  • Issues (assigned, mentioned, authored)
  • Pull requests (review-requested, authored)
  • Releases & deployments
  • Accessibility updates
Batch 2 - run after Batch 1 (CI needs PR list from Batch 1):
  • GitHub Discussions
  • CI/CD health (cross-references PR list)
  • Security alerts
Batch 3 - can overlap with Batch 2:
  • Project board status
  • Recently closed/merged work
批次1 - 完全独立,同时运行:
  • Issues(分配给你的、提及你的、你创建的)
  • Pull requests(待你审核的、你创建的)
  • 版本发布与部署
  • 无障碍更新
批次2 - 批次1完成后运行(CI需要批次1的PR列表):
  • GitHub Discussions
  • CI/CD健康度(交叉引用PR列表)
  • 安全告警
批次3 - 可与批次2重叠运行:
  • 项目看板状态
  • 近期关闭/合并的工作

Example: Analytics - 2 Parallel Batches

示例:分析任务 - 2个并行批次

Batch 1 - collection (all independent):
  • Closed/merged PRs in period
  • Opened issues in period
  • CI workflow runs in period
  • Security alerts in period
Batch 2 - analysis (depends on Batch 1 data):
  • Health score computation
  • Velocity metrics calculation
  • Bottleneck detection
批次1 - 数据采集(全部独立):
  • 时段内关闭/合并的PR
  • 时段内新建的Issues
  • 时段内CI工作流运行记录
  • 时段内安全告警
批次2 - 分析(依赖批次1的数据):
  • 健康度评分计算
  • 效能指标计算
  • 瓶颈检测

Announcement Template for Parallel Work

并行工作的公告模板

text
 Running {N} searches in parallel... ({scope})
 Batch 1 complete - {X} items found

 Running {N} additional searches...
 Batch 2 complete - {Y} items found

 Scoring and prioritizing...
 Done - {Z} items need action, {W} to monitor

text
 Running {N} searches in parallel... ({scope})
 Batch 1 complete - {X} items found

 Running {N} additional searches...
 Batch 2 complete - {Y} items found

 Scoring and prioritizing...
 Done - {Z} items need action, {W} to monitor

Auto-Recovery for Empty Results

空结果自动恢复

If a search returns 0 results:
  1. Automatically broaden: remove date filter, expand scope to
    all
    , or remove label filters.
  2. Tell the user exactly what changed: "No results in last 7 days - broadened to last 30 days and found 3 items."
  3. Never return 0 results without trying at least one broader query first.
Recovery cascade:
  1. First try: Remove date qualifier
  2. Second try: Expand scope (add org: or remove repo: qualifier)
  3. Third try: Remove label filters
  4. Report 0 results only if all three attempts return nothing

如果搜索返回0条结果:
  1. 自动扩大范围:移除日期过滤器、将范围扩展为
    all
    、或移除标签过滤器。
  2. 明确告知用户调整内容:"过去7天无结果 - 已扩大范围到过去30天,找到3条结果。"
  3. 至少尝试一次扩大范围的查询后,才可以返回0条结果。
恢复级联步骤:
  1. 第一次尝试:移除日期限定符
  2. 第二次尝试:扩大范围(添加org:限定符或移除repo:限定符)
  3. 第三次尝试:移除标签过滤器
  4. 仅当三次尝试都返回空时,才报告0条结果

Pagination

分页

  • Paginate large result sets in batches of 10.
  • Ask before loading more: "Showing 10 of 47. Load more?"
  • Never silently truncate results - always disclose the total count.

  • 大型结果集按10条为一批分页。
  • 加载更多前询问用户:"共47条,当前展示10条。是否加载更多?"
  • 不要静默截断结果 - 始终披露总数量。

Result Deduplication

结果去重

When the same item appears in multiple searches (e.g., an issue you're both assigned to AND mentioned in):
  • Show it once, with all context combined.
  • In the Signal column, combine signals: "Assigned, @mentioned".
  • In priority calculations, apply the highest-scoring signal, not additive.

当同一条目在多次搜索中出现(例如:一个Issue既分配给你同时也@了你):
  • 仅展示一次,合并所有上下文。
  • 在信号列合并信号:"已分配, @提及"
  • 优先级计算时,取最高得分的信号,不叠加计算。

Rate Limiting

速率限制

  • If rate-limited (403/429), tell the user the reset time in one sentence.
  • Do not retry the same query - wait if reset is <60 seconds; otherwise report and move on.
  • For multi-stream collection, skip rate-limited streams and complete them in a follow-up.
  • 如果触发速率限制(403/429),用一句话告知用户重置时间。
  • 不要重试相同查询 - 如果重置时间小于60秒则等待,否则报告问题并继续其他任务。
  • 多流采集场景下,跳过触发速率限制的流,后续补全该部分内容。