git-get-notification

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Get Notification

Git通知查询

Check GitHub notifications, recent Issues, and recent PRs for a set of monitored repositories.
查询一组受监控仓库的GitHub通知、近期Issues及PRs。

Trigger

触发条件

When the user asks to check notifications, see what's new, or check updates on monitored repos.
当用户要求查看通知、了解新动态或检查受监控仓库的更新时触发。

Monitored Repos

受监控仓库

  • zilliztech/claude-context
  • zilliztech/memsearch
  • zilliztech/mcp-server-milvus
  • langchain-ai/langchain-milvus
  • milvus-io/milvus-haystack
  • zilliztech/milvus-marketplace
  • zilliztech/vector-graph-rag
  • zilliztech/claude-context
  • zilliztech/memsearch
  • zilliztech/mcp-server-milvus
  • langchain-ai/langchain-milvus
  • milvus-io/milvus-haystack
  • zilliztech/milvus-marketplace
  • zilliztech/vector-graph-rag

Execution Steps

执行步骤

Step 1: Determine Target Repos

步骤1:确定目标仓库

  • If the user specifies a particular repo (e.g., "check mcp-server-milvus"), only query that repo. Match by partial name against the monitored list.
  • If no repo is specified, query all monitored repos.
  • 如果用户指定了特定仓库(例如:"check mcp-server-milvus"),仅查询该仓库。通过部分名称与受监控列表进行匹配。
  • 如果未指定仓库,则查询所有受监控仓库。

Step 2: Fetch GitHub Notifications

步骤2:获取GitHub通知

For each target repo, fetch unread notifications:
bash
gh api notifications --jq '[.[] | select(.repository.full_name == "REPO_NAME")] | sort_by(.updated_at) | reverse'
Classify notifications by reason into two priority tiers:
High Priority (show first, with details):
  • mention
    - Someone @you
  • review_requested
    - Review request
  • assign
    - Assigned to you
Medium Priority (show after high priority):
  • author
    - Updates on your PR/Issue
  • state_change
    - Status changes (merged/closed)
  • comment
    - New comments on your threads
Skip
subscribed
and
CheckSuite
notifications — these are noise.
针对每个目标仓库,获取未读通知:
bash
gh api notifications --jq '[.[] | select(.repository.full_name == "REPO_NAME")] | sort_by(.updated_at) | reverse'
根据通知原因将其分为两个优先级层级:
高优先级(优先展示,包含详情):
  • mention
    - 有人@了你
  • review_requested
    - 评审请求
  • assign
    - 被分配任务
中优先级(高优先级之后展示):
  • author
    - 你的PR/Issue有更新
  • state_change
    - 状态变更(已合并/已关闭)
  • comment
    - 你的讨论线程有新评论
跳过
subscribed
CheckSuite
类型的通知——这些属于无效信息。

Step 3: Fetch Recent Issues

步骤3:获取近期Issues

For each target repo, fetch issues created in the last 7 days:
bash
gh api "repos/REPO_NAME/issues?state=all&sort=created&direction=desc&per_page=20&since=SEVEN_DAYS_AGO_ISO" --jq '[.[] | select(.pull_request == null)]'
  • Use
    date -d '7 days ago' -u +%Y-%m-%dT%H:%M:%SZ
    to compute the since date.
  • If a repo has more than 10 recent issues, show only the 10 most recent and note how many were omitted.
  • Skip closed issues — only show open issues.
针对每个目标仓库,获取过去7天内创建的Issues:
bash
gh api "repos/REPO_NAME/issues?state=all&sort=created&direction=desc&per_page=20&since=SEVEN_DAYS_AGO_ISO" --jq '[.[] | select(.pull_request == null)]'
  • 使用
    date -d '7 days ago' -u +%Y-%m-%dT%H:%M:%SZ
    计算起始日期。
  • 如果仓库的近期Issues超过10条,仅展示最新的10条,并注明省略的数量。
  • 跳过已关闭的Issues — 仅展示开放状态的Issues。

Step 4: Fetch Recent PRs

步骤4:获取近期PRs

For each target repo, fetch PRs updated in the last 7 days:
bash
gh api "repos/REPO_NAME/pulls?state=all&sort=updated&direction=desc&per_page=20" --jq '[.[] | select(.updated_at >= "SEVEN_DAYS_AGO_ISO")]'
  • If a repo has more than 10 recent PRs, show only the 10 most recent and note how many were omitted.
  • Skip merged and closed PRs — only show open PRs.
针对每个目标仓库,获取过去7天内更新的PRs:
bash
gh api "repos/REPO_NAME/pulls?state=all&sort=updated&direction=desc&per_page=20" --jq '[.[] | select(.updated_at >= "SEVEN_DAYS_AGO_ISO")]'
  • 如果仓库的近期PRs超过10条,仅展示最新的10条,并注明省略的数量。
  • 跳过已合并和已关闭的PRs — 仅展示开放状态的PRs。

Step 5: Output Format

步骤5:输出格式

Output in Chinese. Group results by repo. Within each repo, display in this order:
undefined
输出内容为中文。按仓库分组展示结果。每个仓库内按以下顺序展示:
undefined

📋 通知概览

📋 通知概览

zilliztech/mcp-server-milvus

zilliztech/mcp-server-milvus

🔴 高优先级通知

🔴 高优先级通知

  • [review_requested] PR #42: Add new endpoint - @someone 请求你 review (2h ago)
  • [mention] Issue #38: Bug report - @someone 在评论中提到了你 (5h ago)
  • [review_requested] PR #42: Add new endpoint - @someone 请求你 review (2h ago)
  • [mention] Issue #38: Bug report - @someone 在评论中提到了你 (5h ago)

🟡 中优先级通知

🟡 中优先级通知

  • [author] PR #40: Your PR title - 已合并 (1d ago)
  • [comment] Issue #35: Discussion title - 3 条新评论 (3h ago)
  • [author] PR #40: Your PR title - 已合并 (1d ago)
  • [comment] Issue #35: Discussion title - 3 条新评论 (3h ago)

📝 最近 Issues (近 7 天,共 N 条)

📝 最近 Issues (近 7 天,共 N 条)

  • #50 [open] Issue title (2h ago) by @user
  • #49 [closed] Issue title (1d ago) by @user
  • #50 [open] Issue title (2h ago) by @user
  • #49 [closed] Issue title (1d ago) by @user

🔀 最近 PRs (近 7 天,共 N 条)

🔀 最近 PRs (近 7 天,共 N 条)

  • #48 [open] PR title (3h ago) by @user
  • #47 [merged] PR title (2d ago) by @user

  • #48 [open] PR title (3h ago) by @user
  • #47 [merged] PR title (2d ago) by @user

next repo...

next repo...


- Show relative time (e.g., "2h ago", "3d ago") for readability.
- If a repo has zero notifications, zero issues, and zero PRs in the last 7 days, show "✅ 暂无新动态" and move on.
- At the end, show a summary line: "共 X 条高优先级通知,Y 条中优先级通知,Z 条新 Issue,W 条新 PR"

- 展示相对时间(例如:"2h ago"、"3d ago")以提升可读性。
- 如果某个仓库在过去7天内没有通知、Issues和PRs,展示“✅ 暂无新动态”并继续下一个仓库。
- 在最后展示汇总信息:“共 X 条高优先级通知,Y 条中优先级通知,Z 条新 Issue,W 条新 PR”

Notes

注意事项

  • All queries use
    gh api
    which requires
    gh
    CLI to be authenticated.
  • Do NOT mark any notifications as read.
  • The 7-day window is the default. If the user asks for a different time range (e.g., "this month"), adjust accordingly.
  • Keep output concise. If data is overwhelming, prioritize recency and importance.
  • 所有查询使用
    gh api
    ,需要
    gh
    CLI已完成身份验证。
  • 请勿将任何通知标记为已读。
  • 默认时间范围为7天。如果用户要求不同的时间范围(例如:“本月”),请相应调整。
  • 保持输出简洁。如果数据过多,优先展示最新和最重要的内容。