wzw4429-crypto/dsh-github-sync ↗★ 0

dsh-github-sync

GitHub repository sync for DSH: bidirectional git sync with pre-push checks, Actions/CI monitoring with run-detail drill-down, repo add/remove/rename, local file browsing, and a scheduled automation pipeline — from the web panel or agent tools. 适合需要在本地与远端GitHub仓库间保持同步并监控CI/CD状态的用户。

Package
dsh-github-sync
Compatibility
Unverified
Version
1.0.0
License
MIT
Last updated
Oct 14, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wzw4429-crypto/dsh-github-sync

配置放在哪里

包内的 cordis.patch.yml 只声明插件行、不带任何配置;你的 token、仓库列表、定时周期等写在 profile 自己的 patch 层($DSH_HOME/profiles/ /cordis.patch.yml),按 id + 模块名覆盖:

- id: github-sync
  name: dsh-github-sync
  config:
    token: 'ghp_...'
    repos:
      - name: my-repo
        path: D:\path\to\repo

这样密钥与机器路径不会进插件仓库,插件升级也不会覆盖你的配置。面板/工具运行时「加入同步」的仓库存在状态文件里,无需改配置。

配置项(profile patch 层的 github-sync.config)

- id: github-sync
  name: 'dsh-github-sync'
  config:
    enabled: true            # 总开关
    runOnStart: false        # 启动 5s 后先跑一轮
    intervalMinutes: 30      # 定时周期
    tokenEnv: 'GITHUB_TOKEN'
    notifyAgent: true
    notifyOn: [conflict, error, checks, pipeline]   # 事件:conflict/error/checks/pipeline/pull/push
    autoCommit: false        # 同步前把脏工作树自动提交(否则脏树需并入时报 dirty)
    conflictPolicy: 'report' # report/merge/rebase/prefer-remote/prefer-local
    onCheckFailure: 'block'  # 检查未单独声明 onFail 时的默认:block/warn
    repos:
      - name: my-repo
        path: D:\path\to\repo
        remote: origin        # 默认 origin
        branch: ''            # 默认当前分支
        mode: bidirectional   # bidirectional/pull/push
        githubRepo: ''        # 可选显式 owner/name;缺省从 remote URL 推断
        workflowFile: ''      # 可选,补 CI 文件名,默认 .github/workflows/dsh-ci.yml
        checks:
          - name: test
            run: 'npm test'
            onFail: block     # block/warn
    pipeline:
      triggerCi: true         # 同步后 dispatch CI
      waitCi: true            # 轮询到 run 完成
      waitTimeoutMinutes: 10
      pollIntervalSeconds: 20