decaporg / decaporg/decap-cms

Configurable branch name delimiter

Open
#6,604 1 comment 0 reactions 0 assignees View on GitHub
type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**

I would like to use Netlify CMS in a shared Monorepo. However, there's a step in the Monorepo's CI/CD pipeline that requires the branch name to conform to a specific string pattern (here is the function used in the branch name validation step: https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Label). I'm not permitted to exclude the branch validation step either, nor am I able to change the branch name programmatically.

**Describe the solution you'd like**

An option to configure the branch name delimiter in config.yml from `/` to anything, e.g.,
```
# config.yml

# perhaps limited to common, acceptable delimiters such as - and .
branchDelimiter: '-'
```

Source code where this change could be implemented maybe: https://github.com/netlify/netlify-cms/blob/59b9348093b4da6fac67a146dd1f685aad1ca6bb/packages/netlify-cms-lib-util/src/APIUtils.ts

**Describe alternatives you've considered**

I've considered moving my project that implements Netlify CMS out of the Monorepo, but it was not feasible to do so just because of an invalid branch name.

**Additional context**

Example of the invalid branch name failing the branch validation step in the Monorepo CI/CD pipeline
image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.