dsh-github-workflow: A GitHub Workflow Toolkit for DSH Agents

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:

  1. Get Context: Call gh_get_repo_context to obtain a panoramic view of the repository.
  2. Analyze Issue: Call gh_analyze_issue to perform a four-dimensional analysis of the Issue and obtain four layers of context.
  3. Check for Duplicates: Call gh_search_related to check for duplicate Issues or historical attempts.
  4. Create Draft: Call gh_create_draft_pr to create a draft PR with a template.
  5. Check CI: Call gh_check_ci_status to monitor CI status.
  6. Review and Submit: Call gh_review_pr for tiered reviews and submission.
  7. Interaction: Call gh_reply_comment to reply to comment threads.
  8. Merge: Call gh_merge_pr to merge the PR (supports GraphQL).
  9. Cleanup: Call gh_close_issue to close the Issue or gh_delete_branch to 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:

  1. Read-only Mode: When configured with readOnly: true, all write operations are rejected.
  2. User Confirmation: By default, confirmation via the host approval service is required; operations are rejected without confirmation.
  3. 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.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye