Skip to content

feat: allow @ in branch field for monorepo tag support#176

Open
GiffenGood1 wants to merge 1 commit intodavis7dotsh:mainfrom
GiffenGood1:feat/allow-at-in-branch-field
Open

feat: allow @ in branch field for monorepo tag support#176
GiffenGood1 wants to merge 1 commit intodavis7dotsh:mainfrom
GiffenGood1:feat/allow-at-in-branch-field

Conversation

@GiffenGood1
Copy link

@GiffenGood1 GiffenGood1 commented Feb 9, 2026

Hi,

couldn't find a way to get btca to work with monorepo-style git tags like @chakra-ui/[email protected] Just a small update to allow them in the branch names

Summary

  • Adds @ to the branch name validation regex, enabling monorepo-style git tags like @chakra-ui/[email protected] in the branch field
  • Updates error messages across schema, validation, and git clone hint to mention @ symbols
  • Adds branch validation tests (schema-level and integration-level)
  • Adds pattern to the JSON schema branch field

Greptile Overview

Greptile Summary

Added support for @ symbols in git branch names to enable monorepo-style tags like @chakra-ui/[email protected].

Changes:

  • Modified BRANCH_NAME_REGEX in both schema.ts and validation/index.ts to include @ in allowed characters
  • Updated error messages and hints across validation, schema, and git clone logic to mention @ symbols
  • Added pattern validation to JSON schema for branch field
  • Added comprehensive test coverage for branch validation including monorepo tags, version tags, standard branches, and rejection cases

No plan markdown files found in this PR.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are narrow in scope, well-tested, and maintain security checks. The regex modification adds @ to allowed characters while preserving critical security validations (no leading hyphens, character restrictions). Comprehensive test coverage validates both the new functionality and rejection of dangerous patterns. No breaking changes to existing features.
  • No files require special attention

Important Files Changed

Filename Overview
apps/server/src/resources/schema.ts Updated BRANCH_NAME_REGEX to allow @ symbols and updated error message to mention @ symbols
apps/server/src/validation/index.ts Updated BRANCH_NAME_REGEX to allow @ symbols and updated error message in validateBranchName
apps/server/src/resources/impls/git.ts Updated hint message in gitClone to mention @ symbols as allowed characters
apps/server/src/resources/impls/git.test.ts Added comprehensive branch validation tests including monorepo-style tags with @ symbols, rejection tests for invalid patterns
apps/web/static/btca.schema.json Added pattern validation and updated description to mention monorepo-style tags for branch field

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

Enables monorepo-style git tags like @scope/pkg@version (e.g.
@shopify/[email protected]) in the branch field. The @ character
is safe since Bun.spawn uses array-based args and the existing
refine rule still blocks branches starting with - (git option injection).

Closes davis7dotsh#7, closes davis7dotsh#49

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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

Comments