Skip to content
Merged
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
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description
<!-- Briefly explain what was done in this PR. -->

## Change Type
- [ ] New Feature
- [ ] Bug Fix
- [ ] Refactoring
- [ ] Documentation
- [ ] Maintenance Task

## Checklist
- [ ] Code follows defined style standards.
- [ ] New or updated tests added.
- [ ] Test coverage remains acceptable.
- [ ] Documentation has been updated, if applicable.

## Related to
<!-- Reference issues or other PRs. -->
Empty file.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/sync-main-to-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Description
<!-- Briefly explain what was done in this PR. -->

$PR_DESCRIPTION

## Change Type
- [$CHECK_NEW_FEATURE] New Feature
- [$CHECK_HOTFIX] Hot Fix or Bug Fix
- [$CHECK_BRANCH_SYNC] Branch synchronization
- [$CHECK_NEW_RELEASE] New Release

## Checklist
- [ ] Code follows defined style standards.
- [ ] New or updated tests added.
- [ ] Test coverage remains acceptable.
- [ ] Documentation has been updated, if applicable.

## Related to
<!-- Reference issues or other PRs. -->

**Origin Branch:** $ORIGIN_BRANCH

**Date of Creation:** $DATE_CREATED
1 change: 0 additions & 1 deletion .github/workflows/update-version-package-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ jobs:

git pull origin ${{ github.head_ref }} --rebase

# Usar token para autenticação do git push
git push https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git ${{ github.head_ref }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

echo "Checking commit pattern..."
npx --no-install commitlint --edit "$1"
6 changes: 3 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ npm run format:fix
cd ..

if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected after formatting, adding to commit"
echo "Changes detected after formatting, adding to commit"
git add .
echo "Changes added to the commit"
echo "Changes added to the commit"
else
echo "No changes to add"
echo "No changes to add"
fi
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)

if echo "$BRANCH_NAME" | grep -qE '^(feature|bugfix|release|hotfix)\/[a-z0-9-]+$'; then
echo "Valid branch name: $BRANCH_NAME"
echo "Valid branch name: $BRANCH_NAME"
else
echo "🚫 The branch name '$BRANCH_NAME' does not follow the Gitflow standard."
echo "Valid example: feature/new-functionality"
Expand Down
11 changes: 11 additions & 0 deletions check-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

COMMIT_MSG=$(git log -1 --pretty=%B)

if echo "$COMMIT_MSG" | grep -qE '^(feat|fix|docs|chore|style|refactor|test)\:(.*)+$'; then
echo "Commit message follows convention."
else
echo "🚫 ERROR: Commit message '$COMMIT_MSG' does not follow convention. Use 'feat:', 'fix:', etc."
echo "chore: description your commit"
exit 1
fi
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
},
"dependencies": {
"husky": "^9.1.7"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0"
}
}
Loading
Loading