feat: add configurable branch_prefix and commit_prefix settings#567
feat: add configurable branch_prefix and commit_prefix settings#567moisei wants to merge 1 commit intoentireio:mainfrom
Conversation
Add two new settings to .entire/settings.json for customizing branch names and commit message prefixes. This enables using Entire on internal GitHub Enterprise deployments without colliding with public conventions. New settings: - branch_prefix: customizes shadow branch prefix and metadata branch name (default: "entire/", e.g. "jfrog/" → "jfrog/checkpoints/v1") - commit_prefix: customizes checkpoint commit subject prefix (default: "Checkpoint", e.g. "JFrog Checkpoint") Settings are applied via ConfigureBranchPrefix/ConfigureCommitPrefix called during CLI startup (PersistentPreRun) and hook initialization. All existing behavior is preserved when settings are not specified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for making the PR, could you help us understand more what's the use case is or what problem you are trying to solve? The issue with this approach is, that everything using the commits would need to know what the right prefix is to be used for lookup. Especially on entire.io this would be an issue and adds complexity. |
|
Hi @Soph , I've added this Intro to PR. Please lemme know if it is more clear now Many organizations enforce strict policies on git branch naming conventions and commit message formats. With the current hardcoded |
Intro
Many organizations enforce strict policies on git branch naming conventions and commit message formats. With the current hardcoded
entire/prefix andCheckpointcommit subject, Entire's branches and commits fail these checks out of the box - effectively blocking adoption in those environments. This PR addresses the issue by allowing users to configure custom branch name prefixes and commit message prefixes.Summary
.entire/settings.jsonfor customizing branch names and commit message prefixesbranch_prefix(default"entire/") — controls shadow branch prefix and metadata branch name (e.g."jfrog/"→jfrog/checkpoints/v1)commit_prefix(default"Checkpoint") — controls checkpoint commit subject prefix (e.g."JFrog Checkpoint"→JFrog Checkpoint: a3b2c4d5e6f7)Changes
branch_prefix/commit_prefixfields with getters, validation, and merge logicMetadataBranchNamechanged from const to configurable var withConfigureBranchPrefix()ShadowBranchPrefixchanged from const to configurable var withConfigureBranchPrefix()/ConfigureCommitPrefix()"Checkpoint"IsShadowBranch()uses configurable prefix instead of hardcoded regexTest plan
go test ./cmd/entire/cli/...)go test -tags integration ./cmd/entire/cli/...)/,.., invalid chars), local override merge🤖 Generated with Claude Code