Preface¶
In the DSH Web UI, agents can already execute coding tasks; however, if there are multiple GitHub repositories under an account, issues, PRs, local fixes, reviews, and writing back to GitHub still require manual coordination. dsh-ci-cd-bot is a DSH Web UI plugin that listens to issues/PRs in your account’s repositories, automatically fixes bugs using existing local checkouts, and places PRs, feature requests, and other items onto a board for one-click execution, review, and pushing.
Below, we introduce its positioning, capabilities, installation methods, and important notes.
What This Is¶
dsh-ci-cd-bot is a DSH Web UI plugin maintained by bkMoon1024, licensed under the MIT License. It consists of two parts: a host half and a browser half. The host side polls GitHub, matches local repositories, and executes agents; the browser side injects a CI/CD sidebar entry and a middle-column board into the DSH Web UI.
It is suitable for scenarios where you need to connect GitHub issues/PRs with your local DSH workflow. Runtime requirements are Node.js ≥ 22, and the dsh version must be 0.1.0-rc.6; the package.json declares engines as Node.js ^22.19.0 || >=24.0.0.
Core Features¶
First, it listens, then classifies and matches locally, and finally enters the board for execution or automatic fixes.
| Input | Handling Method |
|---|---|
| Bug issue, repository already checked out locally | Automatically queued; agent fixes and self-tests in the local checkout; plugin commits, pushes, optionally creates a PR, and replies to the issue |
| Feature request | Enters the board queue; click Run; agent implements; pushes; replies to the issue |
| Other issue | Enters the board queue; if a local checkout exists, implements and pushes; otherwise, agent drafts a reply, and the plugin publishes it as a comment |
| Pull request | Enters the board queue; click Review; fetches the diff; agent reviews; submits APPROVE / REQUEST_CHANGES / COMMENT; can auto-merge when approved |
Several key constraints:
- Polling targets are repositories under the account; the polling interval for issues/PRs is configurable.
- The first polling uses a watermark, only catching up on recent days.
- Classification is based on label rules and title/body keywords.
- Local matching searches for git checkouts under configured scan roots and DSH workspaces.
- Each run is a real agent session, retained in the session list for viewing transcripts.
- Git branching, committing, and pushing are executed by the plugin; git is prohibited in agent prompts.
- The push policy can be
autoor set toconfirmin the board. - Opening a PR after a fix is enabled by default and configurable.
- Auto-merging after approval is enabled by default and configurable.
Installation and Enablement¶
The package is published on npm and is recommended to be installed from there.
dsh plugin --profile web add dsh-ci-cd-bot
dsh web
On first use, open the settings in the board: paste the GitHub token (repo scope), configure scan roots as needed, and save.
You can verify that the config layer is mounted:
dsh --profile web --dump-config | grep ci-cd-bot
Building from Source¶
To build from source, you can use the build and test commands from the project repository:
git clone https://github.com/bkMoon1024/dsh-ci-cd-bot.git
cd dsh-ci-cd-bot
npm install --ignore-scripts
npm run build
npm test
After building, install it via link:
dsh plugin --profile web add link:$(pwd)
dsh web
Manual Installation and Switching¶
For manual installation, you can link the current directory to the DSH profile’s node_modules:
ln -sfn "$(pwd)" ~/.dsh/profiles/node_modules/dsh-ci-cd-bot
dsh web
Before switching from manual installation to dsh plugin add, remove any manually added insert entries to avoid duplicate lines.
Uninstallation¶
dsh plugin --profile web remove dsh-ci-cd-bot
dsh web
For manual installation, delete the symlink and the insert entry.
Typical Usage¶
Taking a local bug as an example, the plugin first finds the local checkout and then has the agent fix and self-test it. Afterward, the plugin executes a fixed git workflow:
fetch → checkout ghbot/#<n>-<slug> → add → commit → push
If “Open PR after fix” is enabled, the plugin pushes the ghbot/… branch and creates a PR; if not, it pushes the ghbot/… branch without creating a PR. The plugin also replies to the issue.
For a feature request, you typically click Run in the board. After the agent implements it, the plugin pushes according to the push policy and replies to the issue. If the push policy is confirm, the run will pause at the board confirmation step.
For other issues, if a local checkout exists, the plugin arranges implementation and pushes; if there’s no local checkout, the agent drafts a reply, and the plugin publishes the reply as a comment.
For a PR, after clicking Review, the plugin fetches the diff, the agent provides a review result, and submits APPROVE, REQUEST_CHANGES, or COMMENT. If auto-merge after approval is enabled, the plugin executes the merge.
Configuration and Security¶
Configuration is stored at:
~/.dsh/dsh-ci-cd-bot.json
State is stored at:
~/.dsh/dsh-ci-cd-bot-state.json
The GUI settings page edits configuration through the loopback-fenced /api/dsh-ghbot/* route family; configuration file permissions are 0600. The GitHub token is a PAT (repo scope) retained on the host side and never sent to the browser.
Configurable items include scan roots, include/exclude repo filters, run concurrency, run timeout, announceToAgent, and more. Among these, announceToAgent is only configurable via JSON/API.
Applicable Scenarios and Notes¶
This plugin is suitable for:
- Tracking issues/PRs across multiple repositories under your GitHub account;
- Having relevant repository checkouts or DSH workspaces locally;
- Wanting the agent to execute and then have the plugin uniformly commit, push, reply, or review.
Notes:
- The plugin runs with the permissions of the current dsh process; check the source code and license before installation.
- The plugin executes git branch, commit, and push operations; if manual confirmation is required, set the push policy to
confirm in the board. - The GitHub token needs repo scope; only stored on the host side.
- When switching from manual installation to
dsh plugin add, you must first remove manually added insert entries.
Links¶
- GitHub: https://github.com/bkMoon1024/dsh-ci-cd-bot