Skip to content

Docs: own and sync ClickHouse documentation - #958

Open
Blargian wants to merge 2 commits into
ClickHouse:mainfrom
Blargian:agent/own-clickhouse-docs
Open

Docs: own and sync ClickHouse documentation#958
Blargian wants to merge 2 commits into
ClickHouse:mainfrom
Blargian:agent/own-clickhouse-docs

Conversation

@Blargian

@Blargian Blargian commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

Make ClickHouse/clickhouse-js the source of truth for its public ClickHouse documentation.

  • Copy the JavaScript documentation from ClickHouse/ClickHouse@21ed77718a5f454680497924d68e9f60a41e026c into docs/clickhouse-docs/, with trailing whitespace normalized and a client-owned navigation.json. The dedicated subdirectory keeps repository-only troubleshooting docs out of the published slice.
  • Add scoped Mintlify verification for the complete JavaScript documentation folder.
  • Add a one-way sync workflow that replaces the corresponding folder in ClickHouse/ClickHouse after a release, manual dispatch, or merge carrying the sync-docs label.

The published URL remains unchanged. Folder ownership allows future pages to be reviewed alongside the client implementation and synchronized automatically. Fragment links use explicit /index#... targets so offline anchor validation resolves the folder index correctly.

No package behavior changes, so package changelogs are unaffected.

Related: ClickHouse/ClickHouse#111223

After merge, maintainers should confirm the sync-docs label exists and the Workflow Auth GitHub App credentials are available to this repository.

Validation

Copilot AI review requested due to automatic review settings July 21, 2026 12:09
@@ -0,0 +1,50 @@
name: 'Verify Docs'
runs-on: ubuntu-latest
steps:
- name: Checkout docs source
uses: actions/checkout@v5

- name: Generate token for target repo
id: app-token
uses: actions/create-github-app-token@v3
image: clickhouse/docs-builder
steps:
- name: Checkout docs source
uses: actions/checkout@v5
@Blargian Blargian changed the title Own and sync ClickHouse documentation Docs: wwn and sync ClickHouse documentation Jul 21, 2026
@Blargian Blargian changed the title Docs: wwn and sync ClickHouse documentation Docs: own and sync ClickHouse documentation Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes ClickHouse/clickhouse-js the source of truth for the public “JavaScript client” ClickHouse documentation by adding the canonical MDX page to this repo and introducing CI/workflows to validate and one-way sync that page into ClickHouse/ClickHouse.

Changes:

  • Added the ClickHouse JavaScript client documentation page under docs/clickhouse-docs/index.mdx.
  • Added a Mintlify-scoped verification workflow for PRs/pushes touching the docs slice.
  • Added a cross-repo sync workflow that opens/refreshes a PR in ClickHouse/ClickHouse on release, manual dispatch, or a merged PR with a sync-docs label.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
docs/clickhouse-docs/index.mdx Adds the canonical JS client documentation content to be published via the aggregator.
.github/workflows/docs_verify.yml Runs Mintlify validation checks for the docs slice using the upstream check driver.
.github/workflows/docs_sync.yml Automates syncing the canonical docs into ClickHouse/ClickHouse via a bot PR.

| **session_id**?: string | Optional ClickHouse Session ID to send with every request. | - | - |
| **keep_alive**?: `{ **enabled**?: boolean }` | Enabled by default in both Node.js and Web versions. | - | - |
| **http_headers**?: `Record<string, string>` | Additional HTTP headers for outgoing ClickHouse requests. | - | [Reverse proxy with authentication docs](/integrations/language-clients/js#reverse-proxy-with-authentication) |
| **roles**?: string \| string[] | ClickHouse role names to attach to the outgoing requests. | - | [Using roles with the HTTP interface](/concepts/features/interfaces/http#setting-role-with-query-parameters) |

### Query ID {#query-id}

Every method that sends a query or a statement (`command`, `exec`, `insert`, `select`) will provide `query_id` in the result. This unique identifier is assigned by the client per query, and might be useful to fetch the data from `system.query_log`,
Comment on lines +255 to +258
// credentials override; if not specified, the client's credentials will be used.
auth?: { username: string, password: string }
// A specific list of roles to use for this query. Overrides the roles set in the client configuration.
role?: string | Array<string>
Comment on lines +26 to +28
- name: Checkout docs source
uses: actions/checkout@v5

Comment on lines +115 to +121
- name: Checkout docs source
uses: actions/checkout@v5
with:
# On a release, take the docs as of the released tag; otherwise take
# the default checkout (post-merge default branch / dispatched ref).
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}

Comment on lines +129 to +132
- name: Generate token for target repo
id: app-token
uses: actions/create-github-app-token@v3
with:
Copilot AI review requested due to automatic review settings July 21, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (3)

.github/workflows/docs_verify.yml:28

  • This repo pins GitHub Actions to immutable commit SHAs elsewhere (e.g. tests workflows). Using actions/checkout@v5 is a mutable tag and breaks that supply-chain hardening.
      - name: Checkout docs source
        uses: actions/checkout@v5

.github/workflows/docs_sync.yml:120

  • This repo pins GitHub Actions to immutable commit SHAs elsewhere (e.g. .github/workflows/tests-node.yml). Using actions/checkout@v5 is a mutable tag and weakens supply-chain hardening.
      - name: Checkout docs source
        uses: actions/checkout@v5
        with:
          # On a release, take the docs as of the released tag; otherwise take
          # the default checkout (post-merge default branch / dispatched ref).
          ref: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}

.github/workflows/docs_sync.yml:132

  • actions/create-github-app-token@v3 is referenced via a mutable tag. To match the repo’s workflow hardening, pin this action to a full commit SHA (as done for actions/checkout, actions/setup-node, etc.) so the workflow behavior can’t change unexpectedly.
      - name: Generate token for target repo
        id: app-token
        uses: actions/create-github-app-token@v3
        with:

Comment on lines +3 to +5
keywords: ['clickhouse', 'js', 'JavaScript', 'NodeJS', 'web', 'browser', 'Cloudflare', 'workers', 'client', 'connect', 'integrate']
slug: /integrations/javascript
description: 'The official JS client for connecting to ClickHouse.'

NB: request compression is currently not available in the Web version. Response compression works as normal. Node.js version supports both.

Data applications operating with large datasets over the wire can benefit from enabling compression. Currently, only `GZIP` is supported using [zlib](https://nodejs.org/docs/latest-v14.x/api/zlib.html).
Comment on lines +32 to +35
- name: Fetch the docs check driver
run: |
curl -fsSL -o /tmp/mintlify_docs_check.py \
https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/ci/jobs/scripts/docs/mintlify_docs_check.py

@peter-leonov-ch peter-leonov-ch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address the code review comments please, most of them make sense. Otherwise, awesome, thanks a mil for owning this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants