1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 20:02:58 +01:00
metamask-extension/.validate-branch-namerc.js
Pedro Figueiredo 8df3bc9c1b
Label PRs based on the labels of the associated issue (#17603)
* Implement CI to copy issue labels over to PRs

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* clean up

* clean up
2023-05-08 09:51:02 +01:00

12 lines
538 B
JavaScript

const BRANCH_REGEX =
/^(main|develop|(ci|chore|docs|feat|feature|fix|perf|refactor|revert|style)\/\d*(?:[-](?![-])\w*)*|Version-v\d+\.\d+\.\d+)$/;
const ERROR_MSG =
'This branch name does not follow our conventions.' +
'\n' +
'Rename it with "git branch -m <current-name> <new-name>"' +
'\n' +
'Here are some example branch names that are accepted: "fix/123-description", "feat/123-longer-description", "feature/123", "main", "develop", "Version-v10.24.2".';
module.exports = { pattern: BRANCH_REGEX, errorMsg: ERROR_MSG };