From af2f5dbd18db46aeefac3e79691a7789d85bfbb5 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Mon, 18 Sep 2023 12:02:04 +0700 Subject: [PATCH] ci(pre-commit): Add rules for branch namimg Limit slashes in branch names No uppercase letters in branch names --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7c9d1f512..94f4af81da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,12 @@ repos: - id: mixed-line-ending args: ['-f=lf'] - id: double-quote-string-fixer + - id: no-commit-to-branch + name: Do not use more than one slash in the branch name + args: ['--pattern', '^[^/]*/[^/]*/'] + - id: no-commit-to-branch + name: Do not use uppercase letters in the branch name + args: ['--pattern', '^[^A-Z]*[A-Z]'] - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: