Skip to main content
Skip table of contents

Naming convention check

All of the following error messages are displayed when a pull request is created and can also appear in combination.


Naming convention check in commits

Configuration

Regular Expression Explanation

^\[([A-Z]+)-(\d+)\](.|\n)+

→ Each commit message must start with an issue key, which is enclosed in brackets. After the key, there must be a further description.

Possible results

Commands

Expected results

BASH
git commit -m '[TEST-1] further text'
git commit -m '[TEST-2]'

(error) Can not be merged

→ The second commit doesn’t contain a further description

BASH
git commit -m '[TEST-1] further text'
git commit -m 'TEST-2 further text'

(error) Can not be merged

→ The Issue-Key in the second commit isn’t enclosed in brackets

BASH
git commit -m '[TEST-1] further text'
git commit -m '[TEST-2] further text'

(tick) Can be merged


Naming convention check in branch

Configuration

ncBranch.png

Regular Expression Explanation

^(feature|bugfix|hotfix|release|develop)\/[a-z0-9][a-z0-9\-_]*$

The branch must follow this pattern to match:

  1. Start with one of the allowed prefixes:

    • feature/, bugfix/, hotfix/, release/, or develop/

  2. Followed by a lowercase alphanumeric name:

    • Can include lowercase letters (a-z), numbers (0-9), hyphens (-), and underscores (_).

    • Must start and end with a letter or number (no trailing - or _).

Possible results

Commands

Expected results

BASH
git checkout -b fix-typo

(error) Can not be merged

→ Missing a required prefix

BASH
git checkout -b feature//double-slash

(error) Can not be merged

→ Double slashes are not allowed

BASH
git checkout -b feature/new-login

(tick) Can be merged


Naming convention check in Pull-Request

Configuration

Bildschirmfoto 2025-03-26 um 09.34.43.png

Regular Expression Explanation

^(feature|bugfix|hotfix|release|develop)\/[A-Z]+-\d+\s+[A-Za-z0-9 _\-]+$

→ The PR title must follow this pattern to match:

  1. Start with an allowed prefix:

    • feature/, bugfix/, hotfix/, release/, or develop/

  2. Followed by a Jira issue key:

    • Format: PROJECT-123 (uppercase letters, a hyphen, and digits)

  3. Followed by a space and a descriptive title:

    • Can contain letters, numbers, spaces, hyphens (-), and underscores (_).

Possible results

Pull-Request Title

Expected results

main Fix issue

(error) Can not be merged

→ Missing required prefix

bugfix-123 Fix bug

(error) Can not be merged

→ Missing / after prefix

feature/PROJECT_123 Add feature

(error) Can not be merged

→ Issue key must use -, not _

feature/PROJ-1

(error) Can not be merged

→ Missing descriptive title

feature/TEST-123 Add new login button

(tick) Can be merged

Configuration

Bildschirmfoto 2025-03-26 um 09.45.06.png

Regular Expression Explanation

^[A-Z]+-\d+\n\n[\s\S]+$

→ The PR description must follow this pattern to match:

  1. Start with a Jira issue key:

    • Format: PROJECT-123 (uppercase letters, a hyphen, and digits).

  2. Followed by a blank line (for readability).

  3. Followed by a detailed description:

    • Can contain multiple lines.

    • Can include letters, numbers, spaces, punctuation, and special characters.

Possible results

Pull-Request Description

Expected results

Fix issue

(error) Can not be merged

→ Missing issue key

PROJ_123 Fixed a bug

(error) Can not be merged

→ Issue key must use -, not _

PROJECT-123 (alone)

(error) Can not be merged

→ Missing a description

CODE
PROJ-42  

- Fixed authentication bug  
- Improved error handling  
- Updated API responses

(tick) Can be merged

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.