You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commitizen handles expected exceptions through `CommitizenException` and returns different exit codes for different situations. They could be useful if you want to ignore specific errors in your pipeline.
3
+
Commitizen handles expected exceptions through `CommitizenException` and returns different exit codes for different situations.
4
4
5
-
These exit codes can be found in `commitizen/exceptions.py::ExitCode`.
5
+
The following information may come in handy if you want to ignore specific errors in your pipeline.
6
+
7
+
These exit codes can be found in [commitizen/exceptions.py](https://github.com/commitizen-tools/commitizen/blob/master/commitizen/exceptions.py).
| DryRunExit | 0 | Exit due to passing `--dry-run` option |
11
-
| NoCommitizenFoundException | 1 | Using a cz (e.g., `cz_jira`) that cannot be found in your system |
12
-
| NotAGitProjectError | 2 | Not in a git project |
13
-
| NoCommitsFoundError | 3 | No commit found |
14
-
| NoVersionSpecifiedError | 4 | Version can not be found in configuration file |
15
-
| NoPatternMapError | 5 | bump / changelog pattern or map can not be found in configuration file |
16
-
| BumpCommitFailedError | 6 | Commit error when bumping version |
17
-
| BumpTagFailedError | 7 | Tag error when bumping version |
18
-
| NoAnswersError | 8 | No user response given |
19
-
| CommitError | 9 | git commit error |
20
-
| NoCommitBackupError | 10 | Commit back up file cannot be found |
21
-
| NothingToCommitError | 11 | Nothing in staging to be committed |
22
-
| CustomError | 12 |`CzException` raised |
23
-
| NoCommandFoundError | 13 | No command found when running Commitizen cli (e.g., `cz --debug`) |
24
-
| InvalidCommitMessageError | 14 | The commit message does not pass `cz check`|
25
-
| MissingConfigError | 15 | Configuration missed for `cz_customize`|
26
-
| NoRevisionError | 16 | No revision found |
27
-
| CurrentVersionNotFoundError | 17 | current version cannot be found in _version_files_|
28
-
| InvalidCommandArgumentError | 18 | The argument provide to command is invalid (e.g. `cz check -commit-msg-file filename --rev-range master..`) |
29
-
| InvalidConfigurationError | 19 | An error was found in the Commitizen Configuration, such as duplicates in `change_type_order`|
30
-
| NotAllowed | 20 |`--incremental` cannot be combined with a `rev_range`|
31
-
| NoneIncrementExit | 21 | The commits found are not eligible to be bumped |
32
-
| CharacterSetDecodeError | 22 | The character encoding of the command output could not be determined |
33
-
| GitCommandError | 23 | Unexpected failure while calling a git command |
34
-
| InvalidManualVersion | 24 | Manually provided version is invalid |
35
-
| InitFailedError | 25 | Failed to initialize pre-commit |
36
-
| RunHookError | 26 | An error occurred during a hook execution |
37
-
| VersionProviderUnknown | 27 |`version_provider` setting is set to an unknown version provider identifier |
38
-
| VersionSchemeUnknown | 28 |`version_scheme` setting is set to an unknown version scheme identifier |
39
-
| ChangelogFormatUnknown | 29 |`changelog_format` setting is set to an unknown version scheme identifier or could not be guessed |
11
+
|`ExpectedExit`| 0 | Expected exit |
12
+
|`DryRunExit`| 0 | Exit due to passing `--dry-run` option |
13
+
|`NoCommitizenFoundException`| 1 | Using a cz (e.g., `cz_jira`) that cannot be found in your system |
14
+
|`NotAGitProjectError`| 2 | Not in a git project |
15
+
|`NoCommitsFoundError`| 3 | No commits found |
16
+
|`NoVersionSpecifiedError`| 4 | Version is not specified in configuration file |
17
+
|`NoPatternMapError`| 5 | bump / changelog pattern or map can not be found in configuration file |
18
+
|`BumpCommitFailedError`| 6 | Commit failed when bumping version |
19
+
|`BumpTagFailedError`| 7 | Tag failed when bumping version |
20
+
|`NoAnswersError`| 8 | No user response given |
21
+
|`CommitError`| 9 | git commit error |
22
+
|`NoCommitBackupError`| 10 | Commit backup file is not found |
23
+
|`NothingToCommitError`| 11 | Nothing in staging to be committed |
24
+
|`CustomError`| 12 |`CzException` raised |
25
+
|`NoCommandFoundError`| 13 | No command found when running Commitizen cli (e.g., `cz --debug`) |
26
+
|`InvalidCommitMessageError`| 14 | The commit message does not pass `cz check`|
27
+
|`MissingConfigError`| 15 | Configuration is missing for `cz_customize`|
28
+
|`NoRevisionError`| 16 | No revision found |
29
+
|`CurrentVersionNotFoundError`| 17 | Current version cannot be found in _version_files_|
30
+
|`InvalidCommandArgumentError`| 18 | The argument provided to the command is invalid (e.g. `cz check -commit-msg-file filename --rev-range master..`) |
31
+
|`InvalidConfigurationError`| 19 | An error was found in the Commitizen Configuration, such as duplicates in `change_type_order`|
32
+
|`NotAllowed`| 20 |`--incremental` cannot be combined with a `rev_range`|
33
+
|`NoneIncrementExit`| 21 | The commits found are not eligible to be bumped |
34
+
|`CharacterSetDecodeError`| 22 | The character encoding of the command output could not be determined |
35
+
|`GitCommandError`| 23 | Unexpected failure while calling a git command |
36
+
|`InvalidManualVersion`| 24 | Manually provided version is invalid |
37
+
|`InitFailedError`| 25 | Failed to initialize pre-commit |
38
+
|`RunHookError`| 26 | An error occurred during a hook execution |
0 commit comments