dsh-nanshan-market-publish: Track-Based GitHub Publishing and Marketplace Listing per Official Specifications

Preface

In DSH, after finishing a component, it is often split into two tasks: first, push the code to a public GitHub repository, and then submit a PR to the community plugin list repository to generate data/plugins/<owner>__<repo>.yml for directory inclusion. Each step involves git operations, repository topics, pre-check items in contributing.md, and PR-side CI along with held: author follow-up. Manually following the documentation step-by-step takes time and is prone to detours, such as running into issues with details like “opening a PR before the repository is one day old.”

【SouthM】DSH Plugin Market Publishing Assistant (southm/dsh-nanshan-market-publish) is a workflow plugin in the sidebar: it scans locally developed DSH components, guides the publishing process via two mutually independent tracks according to the awesome-dsh-plugin contributing.md, and includes a built-in pre-check checklist consistent with the official requirements.

What is this

Maintained by SouthM, categorized as Workflow. The plugin’s positioning is: discover local component directories, pre-check against official inclusion requirements, use the GitHub REST API and local git to create repos, push, add the dsh-plugin topic, fork the list repo, write the YAML entry, open a PR, and track status. When only the GitHub track is completed, the component is an installable public repository; after the market inclusion track is completed, it can be searched for in the community directory.

Core Features

Component Discovery

Automatically discovers DSH components installed via link: in local archives, as well as currently open workspaces; it also allows using the system native folder picker via “Select Folder” to select any component directory (validating if package.json declares dsh.bundle or dsh.client). If the native picker is unavailable, it falls back to manual absolute path input.

Official Pre-checks

Converts items that would be checked by CI and manual review in the contributing document into a checklist item by item. Examples include: dsh.bundle declaration, repository public status, created for 1 day, dsh-plugin topic, category values, required English description with periods, marketing words, GitHub hosted bitmap icons, tarball links, monorepo subpackage paths, official package peerDependencies, etc. Failed items will explain how to modify.

Two Independent Tracks

Track A: GitHub Submission — Initialize repository (skip if parent directory is already a repo), create and push a public repository, subsequent incremental commits and pushes, append dsh-plugin topic via API. The Token is passed via a one-time credential helper and is not written into .git/config.

Track B: Market PR Submission — Fill in category (official 23 values), English description (required), Chinese description and optional icon/tarball; after passing the pre-checks, fork awesome-dsh-plugin/awesome-dsh-plugin, create a branch on the default branch, write data/plugins/<owner>__<repo>.yml and open a PR; you can view PR status, CI, labels (including held: author), changed files, and comments, and can directly reply to comments.

Each track has independent progress and buttons, allowing you to complete only one. The publishing guide uses a 7-step process, highlighting only “the next incomplete action” and automatically advancing after completion.

Other Capabilities

  • Operations such as repo creation, push, topic, PR, and comments are written to local publishing records, attached with GitHub links.
  • When the repository creation is less than 1 day old, the plugin will intercept PR submission locally and prompt for the remaining wait time.
  • PR submission retry is idempotent: the branch name is fixed, and existing branches and entry files will be reused or updated.
  • Does not depend on the gh CLI; besides api.github.com and local git, it does not initiate other network requests; it does not execute component code, only reads manifest, patch, locale, icons, and Git metadata.

Installation and Activation

Assuming the plugin source code directory has been obtained, use the local installation method in the README:

# Local directory installation
dsh plugin add /path/to/nanshan-market-publish

You can also select Add Plugin in the Plugins page of DSH and point to that directory. After installation, open “Plugin Market Publishing Assistant” in the sidebar. The panel contains four tabs: Component List, Publishing Guide, Publishing Records, and Settings.

Package info (in package.json in the material): Name @wangnanshan/dsh-nanshan-market-publish, current version 1.0.3, license MIT.

Connecting to GitHub

Open Settings → GitHub Connection, fill in a classic Personal Access Token, and check public_repo for public repository operations; if you need to operate private repositories, use the repo permission.

  • The Token is stored in the DSH credential service (record in ctx.credentials), not in config files, not sent back to the page, and not entered into state files.
  • Environment variables GITHUB_TOKEN, GH_TOKEN, NSMP_GITHUB_TOKEN can be used as fallbacks.
  • No need to install GitHub CLI.

Typical Usage

  1. Confirm the scanned components in Component List, or add the to-be-published directory via the folder picker.
  2. In Publishing Guide, first go through the GitHub Submission track: execute initialization, create and push, add topic, etc., as needed.
  3. After the component and repository meet the pre-checks, go through the Market PR Submission track: fill in entry info, and after passing the pre-checks, submit the PR.
  4. View CI, held: author, etc., in the Publishing Records and PR tracking interface; if modification is requested, push and leave a message on the same branch as instructed.
  5. When encountering a push error Error in the HTTP2 framing layer, the plugin will try to retry using HTTP/1.1. For the command line, refer to:
git config --global http.version HTTP/1.1   # Revert: git config --global --unset http.version

Applicable Scenarios and Notes

Suitable for developers iterating on DSH plugins locally and wishing to complete public repositories and market entries following the same community contributing rules. The plugin runs with the current DSH process permissions; before installing, read the repo source code and MIT license, and evaluate the Token permission scope yourself.

Local state is located at ~/.dsh/nanshan-market-publish/state.json; uninstalling the plugin will not delete repositories and PRs on GitHub. If origin is an SSH address, push depends on local SSH key configuration. The DSH community plugin directory is an independent ecosystem site, with no official affiliation with DeepSeek / Huanfang; the “market” mentioned in this article refers to the inclusion process of this community list repository.

Conclusion

southm/dsh-nanshan-market-publish splits “push to GitHub” and “open inclusion PR” into two independently completable tracks, and hardcodes the items in contributing that can be mechanically checked into local pre-checks, reducing invalid PRs caused by format, topic, repository age, and other issues. Directory and source code:

  • Plugin Directory Page: https://www.skillhub.cn/plugins/SouthM/dsh-nanshan-market-publish
  • GitHub: https://github.com/SouthM/dsh-nanshan-market-publish
羽毛球分组比赛记分
小程序二维码

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

Xiaoye