Skip to content
Source
Sign inSign up
TanStack/showcase
A read-only demo of every feature
Every page of this repository is open, and nothing can change. Take a guided tour of what TanStack Source does.
This is a read-only demo: you can look, but not save.

Branch rules

Protect branches: changes come through pull requests, and a pull request merges only when its required checks passed and it has the approvals it needs. Protect tags: only admins and protected CI runs change them. The same rules apply to the merge button, git pushes, the REST API and MCP.

Branch rules

A rule covers the branches that match its pattern. When more than one rule matches a branch, the strictest setting of each wins. A required check must pass on the head commit of the pull request. A check that has not run yet is pending, never passed.
  • main
    Pull request required

    Required checks: ci/types, ci/test

Add a rule

A branch name, like main, or a pattern, like release/**.

Nobody can push to these branches directly: changes come through pull requests. A protected CI run with the push permission can still push.

A pull request merges only when its head has the latest commit of the branch.

When this is off, a required check that was skipped blocks the merge.

Reviews

0 to 10. Only the approvals of people with write access count, never the author's own. A request for changes of one of them blocks the merge.

Each changed file that CODEOWNERS names needs an approval of one of its owners. A team owner counts each of its members.

An approval counts only when it was given on the head commit. After a new push, the pull request needs new approvals.

Pull requests merge by squash or rebase, never with a merge commit, and a direct push that adds a merge commit is refused.

Required checks

The jobs of the workflows on main that run on pull requests. A job of a hidden workflow shows as hidden:<workflow>/<job>.

For a job that is not on main yet: <workflow>/<job>, or hidden:<workflow>/<job>.

Tag rules

A rule protects the tags that match its pattern. Only admins, and protected CI runs whose push permission names the tag, can create, move or delete such a tag. A push of anyone else is refused.

No rules: everyone with write access can create, move and delete tags.

Add a tag rule

A tag name, like v1.0.0, or a pattern, like v*. Leave out refs/tags/.