Skip to content

Manage master branch rules in .asf.yaml - #2225

Merged
msridhar merged 2 commits into
apache:masterfrom
vlsi:asf-yaml-branch-rules
Dec 1, 2026
Merged

msridhar merged 2 commits into
apache:masterfrom
vlsi:asf-yaml-branch-rules

Conversation

@vlsi

@vlsi vlsi commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

After the transfer to the apache organization, PMC members have no admin rights on the repository, so the project can no longer change the two rulesets that protect master (master-no-deletions-or-force-pushes and master-pr-rules, created before the transfer). ASF Infra applies .asf.yaml on every push to the default branch, and it updates an existing ruleset in place when .asf.yaml declares one with the same name.

.asf.yaml declares both rulesets under their current names and keeps their rules: no deletion or force push, linear history, one approving review, squash only, and the merge queue. The required checks CI gate, zizmor, and Validate renovate.json from GitHub Actions move to a new ruleset, master-required-checks. master-pr-rules needs the raw ruleset syntax for its merge queue, and in that syntax asfyaml sends integration_id to GitHub as a string, since integration_id is missing from _NUMERICAL_VALUE_KEYS in asfyaml/feature/github/rulesets.py. The convenience syntax of the new ruleset resolves app_slug: github-actions to the integer 15368. .asf.yaml also pins the current merge settings: squash with the PR title and description as the commit message, auto-merge, and deletion of the head branch after merge. The rebase button is turned off, since the ruleset already allowed only squash.

license/cla is no longer a required check. Uber's CLA assistant reports it, and an ASF project collects contributor agreements through the ASF ICLA instead. If the app is removed from the repository, the check never reports and blocks every PR.

Scope. .github/PULL_REQUEST_TEMPLATE.md still asks contributors to sign the Uber CLA; replacing that text is a separate decision about the CLA. This change does not affect whose approval counts: GitHub counts an approval only from an account with write access, and gitbox grants that to committers who link their GitHub account at https://gitbox.apache.org/setup/. renovate-approve[bot] has no access to the repository, so Renovate PRs now wait for a human approval; whether to exempt them is left for a separate decision.

After the merge, gh api repos/apache/nullaway/rulesets should list the three rulesets, with the merge queue rule still in master-pr-rules.

🤖 Generated with Claude Code

After the transfer to the apache organization, PMC members have no admin
rights on the repository, so the project can no longer change the
rulesets that protect master. ASF Infra applies .asf.yaml on every push
to the default branch and updates an existing ruleset in place when
.asf.yaml declares one with the same name.

.asf.yaml declares master-no-deletions-or-force-pushes and
master-pr-rules under their current names and keeps their rules. The
required checks (CI gate, zizmor, Validate renovate.json from GitHub
Actions) move to a new ruleset, master-required-checks: the raw syntax
that master-pr-rules needs for its merge queue sends integration_id to
GitHub as a string, and the convenience syntax resolves app_slug to the
integer id. license/cla, reported by Uber's CLA assistant, is no longer
required. The merge settings are pinned to squash with the PR title and
description, auto-merge, and head branch deletion.

Assisted-by: Claude Code (claude-opus-5-5)

@msridhar msridhar 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.

Thanks @vlsi!

Comment thread .asf.yaml Resolved
@msridhar
msridhar added this pull request to the merge queue Dec 1, 2026
Merged via the queue into apache:master with commit 1bf8910 Dec 1, 2026
16 checks passed
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