Skip to content

feat(branch-prefix): add repo-level override#509

Open
davinkevin wants to merge 1 commit into
ejoffe:masterfrom
davinkevin:feat/branch-prefix-repo-override
Open

feat(branch-prefix): add repo-level override#509
davinkevin wants to merge 1 commit into
ejoffe:masterfrom
davinkevin:feat/branch-prefix-repo-override

Conversation

@davinkevin
Copy link
Copy Markdown
Contributor

Implement the repo-level branchPrefix config option that PR #494
announced in its commit message ("It can be set at user level or at
repo level, with repo taking precedence") but didn't ship in the code.

Introduce Config.BranchPrefix() helper that returns the effective
prefix with the precedence rule applied and trims any trailing slash.
All call sites in git/helpers.go, github/githubclient/client.go and
spr/spr.go are updated to use this helper instead of reading
User.BranchPrefix directly.

Related to #494

Implement the repo-level `branchPrefix` config option that PR ejoffe#494
announced in its commit message ("It can be set at user level or at
repo level, with repo taking precedence") but didn't ship in the code.

Introduce `Config.BranchPrefix()` helper that returns the effective
prefix with the precedence rule applied and trims any trailing slash.
All call sites in git/helpers.go, github/githubclient/client.go and
spr/spr.go are updated to use this helper instead of reading
User.BranchPrefix directly.

Related to ejoffe#494
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.

1 participant