Skip to content

ci: fix the review bypass, allow only squash merges, delete merged branches - #20804

Merged
amaechler merged 2 commits into
apache:masterfrom
amaechler:require-review-write-role-bypass
Oct 30, 2026
Merged

amaechler merged 2 commits into
apache:masterfrom
amaechler:require-review-write-role-bypass

Conversation

@amaechler

Copy link
Copy Markdown
Contributor

Description

Follow-up to #20796. ASF Infra created the Default Branch Protection ruleset, but GitHub refused the Require review ruleset:

Validation failed while creating ruleset 'Require review':
['Actor druid committers team must be part of the ruleset source or owner organization']

GitHub doesn't accept a secret team as a bypass actor, and druid-committers is secret. The .asf.yaml convenience syntax can only name teams, so this PR switches the ruleset to the raw Rulesets API syntax and uses the Write repository role (actor_id: 4) as the bypass actor instead. On this repository only committers hold the Write role, granted by ASF Infra, so it needs no update when committers change. apache/airflow uses the same workaround for its airflow-committers team.

The rule itself is unchanged: one approving review on master, which committers can explicitly bypass.

Allow only squash merges

Disables the rebase button, so squash is the only way to merge a PR. Merge commits are already disabled. Our contributing guide already expects committers to squash PRs into a single commit. The existing squash commit title and message settings stay as they are.

Delete branches after merge

Turns on del_branch_on_merge, so a branch in the apache/druid repository is deleted once its PR merges. This mostly affects backport and Dependabot branches; branches in contributors' forks aren't touched. Release branches are protected from deletion by the Default Branch Protection ruleset.


This PR has:

  • been self-reviewed.

GitHub refused to create the "Require review" ruleset because the
druid-committers team is secret. Use the raw ruleset syntax, as
apache/airflow does, with the Write repository role as the bypass actor.
@amaechler
amaechler requested a review from cryptoe October 30, 2026 17:37
@amaechler amaechler self-assigned this Oct 30, 2026
@amaechler
amaechler merged commit 7fa5f89 into apache:master Oct 30, 2026
26 checks passed
@amaechler
amaechler deleted the require-review-write-role-bypass branch October 30, 2026 18:35
@github-actions github-actions Bot added this to the 40.0.0 milestone Oct 30, 2026
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.

2 participants