diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9bd44ca925..e277c8c8bc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,8 +3,8 @@ updates: - package-ecosystem: "gomod" directory: "/" schedule: - interval: "daily" + interval: "weekly" labels: - "dependencies" commit-message: - prefix: "chore" + prefix: "bot" diff --git a/.github/workflows/validate-title.yml b/.github/workflows/validate-title.yml index 4f05d6fa46..9899a9b92a 100644 --- a/.github/workflows/validate-title.yml +++ b/.github/workflows/validate-title.yml @@ -27,7 +27,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code into the directory uses: actions/checkout@v3 diff --git a/tools/configs/chglog/config.yml b/tools/configs/chglog/config.yml index 409a716664..7dc37da986 100755 --- a/tools/configs/chglog/config.yml +++ b/tools/configs/chglog/config.yml @@ -5,12 +5,18 @@ info: repository_url: https://github.com/sourcenetwork/defradb options: commits: - filters: - Type: - - feat - - fix - - perf - - refactor + filters: + Type: + - feat + - fix + - tools + - docs + - perf + - refactor + - test + - ci + - chore + - bot commit_groups: title_maps: feat: Features @@ -21,6 +27,7 @@ options: refactor: Refactoring test: Testing ci: Continuous integration + bot: Bot sort_by: Custom title_order: - feat @@ -32,6 +39,7 @@ options: - test - ci - chore + - bot header: pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" pattern_maps: diff --git a/tools/scripts/scripts_test.sh b/tools/scripts/scripts_test.sh index 2d65b97ebc..fd610348b2 100755 --- a/tools/scripts/scripts_test.sh +++ b/tools/scripts/scripts_test.sh @@ -47,3 +47,6 @@ TestReturnCode "${T1} 'perf: This is a valid title'" 0; TestReturnCode "${T1} 'refactor: This is a valid title'" 0; TestReturnCode "${T1} 'test: This is a valid title'" 0; TestReturnCode "${T1} 'tools: This is a valid title'" 0; +TestReturnCode "${T1} 'bot: Bump github.com/alternativesourcenetwork/defradb from 1.1.0.1.0.0 to 1.1.0.1.0.1'" 0; +TestReturnCode "${T1} 'bot Bump github.com/alternativesourcenetwork/defradb from 1.1.0.1.0.0 to 1.1.0.1.0.1'" 3; +TestReturnCode "${T1} 'bot Bump github.com/short/short from 1.2.3 to 1.2.4'" 4; \ No newline at end of file diff --git a/tools/scripts/validate-conventional-style.sh b/tools/scripts/validate-conventional-style.sh index 4fbe433970..b8820be55b 100755 --- a/tools/scripts/validate-conventional-style.sh +++ b/tools/scripts/validate-conventional-style.sh @@ -18,7 +18,10 @@ readonly -a VALID_LABELS=("chore" "perf" "refactor" "test" - "tools"); + "tools" + "bot"); + +BOTPREFIX="bot" if [ "${#}" -ne 1 ]; then printf "Error: Invalid number of arguments (pass title as 1 string argument).\n"; @@ -26,9 +29,16 @@ if [ "${#}" -ne 1 ]; then fi TITLE=${1}; +IS_BOT=false; + +# Detect if title is prefixed with `bot` +if [[ "${TITLE}" =~ ^"${BOTPREFIX}:" ]]; then + printf "Info: Title is from a bot, skipping length-related title validation.\n"; + IS_BOT=true; +fi # Validate that the entire length of the title is less than or equal to our character limit. -if [ "${#TITLE}" -gt 60 ]; then +if [ "${#TITLE}" -gt 60 ] && [ "${IS_BOT}" = false ]; then printf "Error: The length of the title is too long (should be 60 or less).\n"; exit 3; fi