Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion commitizen.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ const scopes = [
'status',
'branch-name',
'develop-branch',
'upstream-or-origin'
'upstream-or-origin',
'main-branch'
].map(name => ({ name }));

module.exports = {
Expand Down
3 changes: 0 additions & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ module.exports = {
// Apply valid scopes and types
'scope-enum': [scopeValidationLevel, 'always', validScopes],
'type-enum': [2, 'always', validTypes],

// Disable language rule
lang: [0, 'always', 'eng']
}
};
9 changes: 6 additions & 3 deletions src/jlegrone.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Start a hotfix branch based off of latest master branch
# Usage: git hotfix <name-of-production-patch>
hotfix = "!sh -c \"git checkout master && git pull && git cb hotfix/$1\" -"
hotfix = "!sh -c \"git checkout $(git main-branch) && git pull && git cb hotfix/$1\" -"

# Create a "work in progress" commit with your current changes
# Usage: git wip
Expand Down Expand Up @@ -67,7 +67,7 @@

# Delete merged branches
# Usage: git cleanup
cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
cleanup = "!git branch --merged | grep -v '\\*\\|main\\|master\\|develop' | xargs -n 1 git branch -d"

# Create a new branch
# Usage: git cb <branch-name>
Expand All @@ -85,7 +85,10 @@
branch-name = "!git rev-parse --abbrev-ref HEAD"

# Get the develop branch (used in other aliases)
develop-branch = "!(git show-ref --quiet refs/heads/develop && echo develop) || echo master"
develop-branch = "!(git show-ref --quiet refs/heads/develop && echo develop) || echo $(git main-branch)"

# Get remote name (prefer upstream over origin)
upstream-or-origin = "!(git remote | grep upstream) || echo origin"

# Get main branch name (prefer main over master)
main-branch="!(git show-ref --quiet refs/heads/main && echo main) || echo master"