Skip to content

[pull] main from tinacms:main - #311

Merged
pull[bot] merged 2 commits into
code:mainfrom
tinacms:main
Aug 21, 2026
Merged

[pull] main from tinacms:main#311
pull[bot] merged 2 commits into
code:mainfrom
tinacms:main

Conversation

@pull

@pull pull Bot commented Aug 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

kulesy and others added 2 commits August 21, 2026 14:16
)

Closes #6762

**TL;DR** Normalise branch names to valid Git refs at every branch
creation site, and disable saving when the name normalises to empty, so
"Save to new branch" no longer fails with a generic *Branch operation
failed*.

**Pain:** A collection `path` with a trailing slash (e.g.
`content/articles/` on ssw.com.au) makes the create form build file
paths like `content/articles//foo.mdx`. The default branch name derived
from that path becomes `tina/articles//foo`, an invalid Git ref, so the
server-side workflow fails and the UI only surfaces *Branch operation
failed* plus a `Failed to check workflow status` console error.
User-typed names containing spaces or other Git-forbidden characters
failed the same way, and the `formatBranchName` helper was duplicated
with diverged behaviour (the legacy branch switcher deleted invalid
characters instead of hyphenating) while collapsing slash runs nowhere.

**Solution:** Centralise the naming helpers in `@utils/branch-name`
(`formatDefaultBranchName`, `normalizeBranchName`, and the previously
duplicated `formatBranchName`) and normalise to `check-ref-format` rules
at every creation site: the save-to-new-branch modal, both branch
switchers, and the deleted-branch recovery modal. Normalisation
collapses repeated and leading/trailing slashes, turns characters Git
forbids in refs (whitespace, control characters, `~ ^ : ? * [ \` and the
`@{` sequence) into hyphens, collapses `..` runs, and strips leading
dots and trailing `.` / `.lock` per path component, using loop-based
trims rather than the anchored regexes CodeQL flags. Save buttons are
disabled while the name normalises to an empty string (e.g. `///`), and
the helpers have unit tests (18 passing).

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
…et (#7459)

Closes #7435

**TL;DR** Six dependency PRs merged in four days with no changeset, so
none of them ever reached npm. This adds a CI check that flags it.

**Pain:** A PR that changes a published package's dependencies without a
changeset merges cleanly, produces no version bump, no changelog entry
and no release, so the change never reaches npm users. Nothing catches
it: CI is green, `dependency-review` only reports what a diff
introduces, and review has missed it six times in four days (#7079,
#7320, #7422, #7425, #7321, #7447). Two of those were security fixes,
which meant the advisory stayed open for anyone installing the package
while `main` looked fixed. A naive rule is not enough either, since
plenty of manifest changes genuinely need no changeset.

**Solution:** Adds `.github/scripts/check-changeset.mjs` and a
`require-changeset` workflow that resolves which *published* packages a
PR actually affects, either through a changed manifest or through a
moved `catalog:` entry that a published package consumes, and skips
anything private or listed in the changesets `ignore` config. The check
goes red only when such a package is affected and no `.changeset/*.md`
is present. It is **not** in the required-status-checks list
(`license/cla`, `build (macOS-latest)`, `build (ubuntu-latest)`), so a
failure is a visible red X rather than a merge blocker, and it fails
open when it cannot determine an answer. Dependabot is deliberately not
exempt, since its PRs are the ones that keep merging unreleased; a
`skip-changeset` label is the escape hatch for a change that genuinely
ships nothing.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot merged commit d6a0a2f into code:main Aug 21, 2026
9 of 10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant