Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/learnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
- If `graph` grammar generation must stay on `ANTLR` `4.13.2`, prefer downloading the exact complete jar into `/usr/local/lib` instead of relying on Ubuntu's older `antlr4` package.
- For `ClickHouse` devcontainers on macOS, keep the source tree bind-mounted but move the build directory onto a Docker named volume or another container-local path to avoid Docker Desktop bind-mount I/O bottlenecks.
- On macOS devcontainers, the cleanest compromise is often mounting the Docker volume directly at `/workspace/ClickHouse/build`, so editors keep the familiar path while build I/O stays off the host bind mount.
- GitHub rulesets can require PRs and block direct pushes on target branches, but they do not natively express "base branch X only accepts head branches matching Y"; enforce that part with a required `pull_request` workflow.
- GitHub rulesets can require PRs and block direct pushes on target branches, but they do not natively express "base branch X only accepts head branches matching Y"; if we choose not to add a repository workflow for that, the source-branch flow remains a convention only.
62 changes: 0 additions & 62 deletions .github/scripts/validate_branch_policy.py

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/branch_policy.yml

This file was deleted.

13 changes: 3 additions & 10 deletions docs/development/github_branch_policy.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# GitHub Branch Policy

This repository uses two layers of enforcement for branch flow:

1. GitHub rulesets protect the target branches.
2. The `branch policy / validate` workflow checks whether the pull request source branch is allowed for the target branch.
This repository uses GitHub rulesets to protect target branches. Branch naming and source-to-target flow stay as project conventions.

## Branch naming

Expand All @@ -28,23 +25,19 @@ Examples:

## Required GitHub rulesets

GitHub rulesets can require pull requests and block direct pushes on protected targets, but the head-branch restriction is enforced by the workflow because GitHub does not provide a native rule for "base branch X only accepts head branches matching Y".
GitHub rulesets can require pull requests and block direct pushes on protected targets. They do not natively enforce "base branch X only accepts head branches matching Y", so the source-branch flow above is currently a repository convention rather than a hard check.

After merging this file and the workflow, configure these repository rulesets in GitHub:
Configure these repository rulesets in GitHub:

1. Ruleset for `master`
- Target branches: `master`
- Require a pull request before merging
- Restrict updates
- Require status checks to pass before merging
- Required check: `branch policy / validate`

2. Ruleset for module main branches
- Target branches: `*/main-*`
- Require a pull request before merging
- Restrict updates
- Require status checks to pass before merging
- Required check: `branch policy / validate`

Optional hardening:

Expand Down
Loading