liufangrui1105/dsh-plugin-github ↗★ 0

dsh-plugin-github

绑定账号以执行代码库克隆与提交 适合需要授权 Agent 自动进行 GitHub 仓库读写和版本控制的用户。

包名
dsh-plugin-github
兼容性
待验证
版本
0.1.0
许可证
MIT
最近更新
2026年10月14日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:liufangrui1105/dsh-plugin-github

4. Configuration

Configuration lives under the plugin row's config: in the profile's cordis.patch.yml (that file replaces the whole config value; it does not deep-merge).

FieldDefaultMeaning
workspaceRoothost process working directoryRoot for local clones. Every gh_* path is confined to this directory
allowRepos[]Repository allowlist: owner/repo, owner/*, */repo, *. Empty means no restriction by repository name. Only strict owner/repo is accepted; full URLs are rejected
allowPushfalseAllow pushing and creating remote repositories. While off, gh_push and gh_commit{push:true} are refused outright
allowForcePushfalseAllow --force-with-lease (still requires allowPush)
allowApiWritefalseAllow POST/PATCH/PUT/DELETE on gh_api, and gh_repo action=create
allowApiReadOutsideAllowlistfalseSet true to let read-only gh_api reach repositories outside the allowlist (e.g. searching public repositories)
allowNonGithubRemotesfalseAllow remotes other than github.com (self-hosted Git). Off by default: the allowlist constrains owner/repo but not the host, so allowing any host means allowing the PAT to be sent anywhere
allowAutoBindtrueWhether to prompt for account binding when credentials are needed
promptForTokentrueWhether the prompt may collect a pasted token
accountStorePath$DSH_HOME/github-accounts.jsonAccount file path (used only when the DSH credential service is not mounted)
tokenRefGITHUB_TOKENCredential reference name (the key under refs: in $DSH_HOME/.credentials.yaml)
tokenEnvGITHUB_TOKENEnvironment variable to fall back to (then GITHUB_TOKEN / GH_TOKEN)
dotenvtrueAlso fall back to .env.local / .env in the workspace
commandTimeoutMs120000Timeout for a single git command
maxDiffChars / maxReadChars20000 / 40000Cap on content returned to the model
gitAuthorName / gitAuthorEmailunsetCommit author; unset means the git global configuration

Enabling writes:

- id: github-repo
  config:
    allowPush: true
    allowApiWrite: true
    allowRepos:
      - your-name/your-repo
    workspaceRoot: '/path/to/clones'