dsh-github-message:用 gh 只读轮询,把 GitHub 事件变成超级助理信号

Introduction

In DSH (DeepSeek Harness), building agents often requires separating “the human is still staring at GitHub” from the actual task: one side is monitoring PRs, Issues, and @mentions, and the other is deciding whether to disturb you, whether to perform reviews or analysis. Writing custom polling scripts easily gets entangled with gh authentication, rate limiting, and deduplication; relying solely on browser notifications makes it hard to receive unified sources like my-superagent/v1.

dsh-github-message is a community-maintained online plugin with a clear positioning: Local gh read-only polling → Translate into standard signals → Report or local alerts. Reviews, writing back to GitHub, and whether to notify the user are delegated to dsh-my-superagent or other core components; this plugin’s code contains no operations to write to GitHub.

What is This

  • Name: dsh-github-message (same as npm package name)
  • Maintainer: xbzbing
  • Category: Online Tools
  • Current Version (package.json): 0.1.1, License MIT
  • Function: Periodically queries pending review PRs, new Issues in maintained repos, @mentions, etc., using the GitHub CLI, and maps them to my-superagent/v1 signals; when the super assistant is not connected, new messages appear as popup cards in the bottom right corner of the DSH Web page.

The plugin runs with the DSH process, verified compatible with dsh@0.2.2-rc.1 (documented), Node.js ≥ 24.9.

Core Features

The capabilities listed below are detailed item by item in the README; this plugin only performs collection, translation, and reporting.

Pending Review PRs and PRs in My Repositories

  • Pending Review PRs: Open PRs where review-requested:@me, deduplicated by head commit; the same PR only counts as a new event if a new commit is pushed.
  • PRs in My Repositories: When prScope: owned, it also queries open PRs opened by others in your repos based on user:@me, orgs, and the repo list, reporting them as github.pr.repo (your own PRs go through the self-submit stream).

Issues and @ Mentions

  • New Issues: By default, only watches the “Maintained Repos” list; when issueScope: owned, it additionally covers repos under your name and checks each organization listed in orgs one by one. Alerts once per creation time.
  • @ Mentions: Prioritizes Notifications (reason=mention|team_mention); falls back to mentions:@me search if unavailable. Deduplicated by comment ID. Requires notifications scope; if missing, the panel will prompt to run gh auth refresh -s notifications.

Polling and Local Alerts

  • Default interval is 5 minutes, configurable from 1 minute to 24 hours; the actual interval takes the larger of the configuration and GitHub’s X-Poll-Interval. Exponential backoff on failure (max 30 minutes), wait for X-RateLimit-Reset on rate limiting.
  • When the super assistant is not connected: Max 4 cards in the bottom right, disappear after ~12 seconds, clickable to open GitHub. Each message pops up only once. Recorded in notified.json, separated from seen used for reporting.

Signal Contract (Integration with Core)

kind Typical Trigger
code-review.requested Someone requests me (or my team) to review a PR
github.pr.opened A PR I opened myself
github.pr.repo A PR opened by someone else in my repos (prScope=owned)
github.issue.opened New Issues in maintained list / owned repos / org repos
github.mention @ me or my team in Issues/PRs/Comments

The plugin is registered with trust: 'external', and the core only adopts it after verifying the source; payload only contains display and routing fields, no raw API, diff, or token.

Installation and Activation

The repo does not commit lib/, so you cannot use dsh plugin add github:xbzbing/dsh-github-message directly. Please use npm or Release attachments. The commands are from the official README:

# Official version (npm)
dsh plugin --profile web add dsh-github-message@latest

# Pre-release (npm stage channel, version number like 0.1.0-stage.0)
dsh plugin --profile web add dsh-github-message@stage

# Or specify a version from a GitHub Release attachment
dsh plugin --profile web add https://github.com/xbzbing/dsh-github-message/releases/download/v0.1.0/dsh-github-message-0.1.0.tgz

After installation, enable monitoring and reporting with the following steps:

  1. Open Settings → Plugins → GitHub Messages, confirm that “GitHub Login” is green (local gh auth status passed).
  2. In “Maintained Repos”, fill in the owner/repo you want to monitor.
  3. Source is off by default; if you want to use the super assistant, go to the super assistant’s “Sources” page and turn on github-message (the core needs to declare github-source; old core will dry-run, only collecting not pushing).

For updates: only client changes require a page refresh; if there are host changes, you need dsh plugin remove then add, and if HMR is not enabled in the profile, restart dsh.

Prerequisites

gh auth status
  • GitHub CLI installed and logged in.
  • notifications scope is required to see @ mentions.
  • Reporting to the super assistant: Install dsh-my-superagent and implement github-source (docs state P1 is implemented).

Configuration Key Points

The panel allows changing the polling period, repos, Issue/PR scope, and organization list. After saving, it is written to $DSH_HOME/dsh-github-message/config.json, overriding the Cordis patch. Deleting this file reverts to the patch defaults.

When doing an overall replacement-style patch in the profile’s cordis.patch.yml, you need to keep the keys you still want to use. The example provided in the README:

- id: dsh-github-message
  name: dsh-github-message
  config:
    intervalMs: 300000
    windowMs: 604800000
    issueScope: owned
    prScope: owned
    repos:
      - xbzbing/dsh-my-superagent
    orgs:
      - my-org
    mentionMode: notifications

Summary of common items: intervalMs defaults to 300000 (5 minutes); issueScope defaults to repos (list only), can be changed to owned; prScope defaults to review, can be changed to owned; mentionMode is notifications / search / off.

Local data is only written to $DSH_HOME/dsh-github-message/ (seen.json, notified.json, stats.json, config.json, poll.log, etc.), with permissions 0700/0600. The plugin does not read or write tokens; gh uses its own keyring, and subprocesses do not pass GH_TOKEN / GITHUB_TOKEN.

Use Cases and Notes

Who is this for

  • Users already using the super assistant under the DSH Web profile, who want GitHub to-dos to be a unified source.
  • Users not yet connected to the core, but who need read-only alerts in the bottom right corner and are willing to use local gh for polling.
  • Maintainers of a small number of repos or organizations, who are willing to maintain repos / orgs lists in the panel or patch.

Must Know Before Use

  • The plugin runs with current DSH process permissions. It is recommended to check the GitHub repository source code and MIT license before installing.
  • Read-only: Only uses gh api GET / search / notifications, no POST/PATCH/PUT/DELETE, nor calls gh pr review, gh issue comment, etc.
  • The community plugin directory SkillHub entry and DeepSeek / Fangyuan have no official affiliation; the ecosystem philosophy is “everything is a plugin”; facts in this article are based on the repo README.

Conclusion

dsh-github-message turns the various facts on GitHub “that need your attention” into a pipeline that is deduplicable, rate-limited, and integrable with my-superagent/v1; writing back and whether to disturb you are left to upper-level agents. Open the repo README for plugin description and configuration table; access the SkillHub directory page and GitHub homepage for browsing categories and intro:

  • Directory page: https://www.skillhub.cn/plugins/xbzbing/dsh-github-message
  • GitHub: https://github.com/xbzbing/dsh-github-message
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye