Introduction¶
Generic GitHub API tools typically focus on executing single requests, such as fetching an Issue or posting a comment. However, what a Coding Agent needs is a complete closed-loop process: from Issue analysis, code writing, and draft PR generation to CI checks, tiered reviews, and merge/release.
dsh-github-workflow is a deep GitHub workflow toolset for DeepSeek Harness (DSH). It solidifies the development process into 12 vertical tools, enabling Agents to execute full-chain operations from Issue triage to PR merge.
Core Features¶
The plugin provides the following core capabilities:
- Repository Context Retrieval: Fetches governance rules such as branches, PRs, Issues, and CODEOWNERS.
- Issue Analysis: Provides a four-dimensional scaffold (problem understanding, impact scope, implementation suggestions, potential risks) and four layers of context (related PRs, historical PRs, similar Issues, code references).
- Search & Duplicate Check: Searches for relevant Issues and PRs to perform duplicate checks before starting work.
- Draft PR Management: Creates draft PRs with templates and linked Issues, automatically deriving change descriptions.
- CI Diagnostics: Checks CI status and retrieves annotations for failed items.
- Tiered PR Review: Categorizes review results into three levels—Blocking, Suggestions, and Optimization—and generates structured comments.
- Comments & Release: Supports replying to comments and generating release notes.
- Merge & Cleanup: Merges PRs via GraphQL, closes Issues, and deletes branches.
Installation and Enablement¶
Installing the plugin requires the host environment to provide a DSH profile. The installation command is as follows:
dsh plugin --profile web add dsh-github-workflow
Before installation, ensure that the host environment version meets the peerDependencies requirements. The plugin declares the following version ranges:
@deepseek-ai/dsh-credentials@deepseek-ai/dsh-session@deepseek-ai/dsh-tools@deepseek-ai/dsh-user-approval
If the versions do not match (e.g., the runtime is 0.2.0-rc.2 but the plugin requires ^0.1.0-rc.1 || ^0.2.0-rc.1), the plugin will fail silently. It is recommended to use a host environment with version ^0.1.0-rc.1 or ^0.2.0-rc.1.
Typical Usage¶
This plugin supports the standard Issue-to-Merge flow. The typical call sequence is as follows:
- Get Context: Call
gh_get_repo_contextto obtain a panoramic view of the repository. - Analyze Issue: Call
gh_analyze_issueto perform a four-dimensional analysis of the Issue and obtain four layers of context. - Check for Duplicates: Call
gh_search_relatedto check for duplicate Issues or historical attempts. - Create Draft: Call
gh_create_draft_prto create a draft PR with a template. - Check CI: Call
gh_check_ci_statusto monitor CI status. - Review and Submit: Call
gh_review_prfor tiered reviews and submission. - Interaction: Call
gh_reply_commentto reply to comment threads. - Merge: Call
gh_merge_prto merge the PR (supports GraphQL). - Cleanup: Call
gh_close_issueto close the Issue orgh_delete_branchto delete the branch.
Security Mechanism¶
The plugin adopts a Fail-closed mechanism to protect write operations. All write operations converge at a single permission gate, checked in sequence:
- Read-only Mode: When configured with
readOnly: true, all write operations are rejected. - User Confirmation: By default, confirmation via the host approval service is required; operations are rejected without confirmation.
- Token Permission Validation: Checks
requiredTokenScopes; tokens with unverifiable permissions (such as fine-grained PATs) are rejected.
Every rejected operation is recorded in the session log for auditing purposes.
Summary¶
Through 12 vertical tools, dsh-github-workflow provides DSH Coding Agents with comprehensive GitHub development workflow capabilities. Featuring zero runtime dependencies, an MIT license, and a Fail-closed security design, it is suitable for developers requiring deep integration with GitHub workflows.
- Landing Page: https://www.skillhub.cn/plugins/ZariaEcho/dsh-github-workflow
- GitHub Repository: https://github.com/ZariaEcho/dsh-github-workflow