auto-commit-msg
auto-commit-msg copied to clipboard
Add scope
WIP code
// too much refactor is needed in prepareCommitMsg to use a scope variable
// so just add to type for now
getScope() {
if (this.isPackageRelated()) {
return CONVENTIONAL_SCOPE.DEPENDENCIES
}
return CONVENTIONAL_SCOPE.UNKNOWN
export function preparePrefix(
type: CONVENTIONAL_TYPE,
scope: CONVENTIONAL_SCOPE
) {
return `${type}(${scope})`;
}
/**
* Conventional commit scopes.
*
* See convention-commits.md doc for more info.
*/
export enum CONVENTIONAL_SCOPE {
DEPENDENCIES = "deps",
UNKNOWN = "",
}