Skip to content

feat(DEVX-6928): use server-side repo name validation for EVCS site creation#2831

Open
kporras07 wants to merge 1 commit into4.xfrom
devx-6928
Open

feat(DEVX-6928): use server-side repo name validation for EVCS site creation#2831
kporras07 wants to merge 1 commit into4.xfrom
devx-6928

Conversation

@kporras07
Copy link
Copy Markdown
Contributor

Summary

  • Replace local validateRepositoryName() (regex) and validateRepositoryExistsOrNot() (search + filter) with a single call to the new GET /repository/validate-name endpoint from DEVX-6926
  • Add validateRepositoryName() method to VcsApi\Client that calls the new endpoint
  • Remove ~120 lines of local validation logic; the server now handles name format validation and existence checking in one call
  • Server-side validation covers additional rules the local regex missed: consecutive --/__, underscore support, must start/end with alphanumeric

Dependencies

Test plan

  • CI unit tests pass
  • E2E: terminus site:create with --vcs-provider=github and valid new repo name succeeds
  • E2E: invalid name (e.g. --bad--) returns server-side validation errors
  • E2E: existing repo with --create-repo returns "already taken" error
  • E2E: existing repo with --no-create-repo succeeds
  • E2E: non-existing repo with --no-create-repo returns "does not exist" error

🤖 Generated with Claude Code

…reation

Replace local regex-based validateRepositoryName() and client-side
validateRepositoryExistsOrNot() with a single call to the new
GET /repository/validate-name endpoint from DEVX-6926. This moves
name format validation and existence checking to the VCS service,
which covers additional rules (consecutive --, __, underscore support).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kporras07 kporras07 requested a review from a team as a code owner April 30, 2026 14:50
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.

3 participants