Files
git-flow/src/git_flow/__init__.py
T

76 lines
1.4 KiB
Python

GitFlowError = ValueError
BRANCH_TYPES = [
"feature",
"bugfix",
"hotfix",
"refactor",
"perf",
"docs",
"style",
"test",
"build",
"ci",
"chore",
]
COMMIT_TYPES = [
"feature",
"bugfix",
"hotfix",
"refactor",
"perf",
"revert",
"docs",
"style",
"test",
"build",
"ci",
"chore",
"wip",
]
WIP_BRANCH_PREFIX = "wip/"
TRASH_BRANCH_PREFIX = "trash/"
# Commits con estos valores incrementan el componente correspondiente
SEMVER_MAJOR = 3
SEMVER_MINOR = 2
SEMVER_PATCH = 1
# Commits con estos tipos no alteran la versión
SEMVER_SKIP = 0
# Un commit marcado como breaking change (<tipo>!: <mensaje>) incrementa SEMVER_MAJOR sin importar
# el tipo. Los tipos que no figuran aquí no alteran la versión.
COMMIT_TYPE_INCREMENT = {
"feature": SEMVER_MINOR,
"bugfix": SEMVER_PATCH,
"hotfix": SEMVER_PATCH,
"refactor": SEMVER_PATCH,
"perf": SEMVER_PATCH,
"revert": SEMVER_PATCH,
"docs": SEMVER_SKIP,
"style": SEMVER_SKIP,
"test": SEMVER_SKIP,
"build": SEMVER_SKIP,
"ci": SEMVER_SKIP,
"chore": SEMVER_SKIP,
"wip": SEMVER_SKIP,
# Alias de Conventional Commits, para commits creados fuera de git-flow
"feat": SEMVER_MINOR,
"fix": SEMVER_PATCH,
}
SUPPORTED_REMOTE_URL_SCHEMAS = [
"ssh",
"http",
"https"
]
REPOSITORY_TOKEN_FILENAME = ".repository-token"
FLOWCONFIG_FILENAME = ".flowconfig"
FLOWCONFIG_VERSION = 2