From 18ea1c51b5b26e98bb3d180640cff9cbbc7e928d Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:13:15 -0500 Subject: [PATCH] fix(ci): title validator handle no parentheses + enforce whitespace (#281) --- .github/workflows/validate-pr-title.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml index aa3588f..462f9be 100644 --- a/.github/workflows/validate-pr-title.yml +++ b/.github/workflows/validate-pr-title.yml @@ -4,14 +4,14 @@ name: validate PR title # trigger on pull_request events of the opened & edited type. on: pull_request: - types: [ opened, synchronize, edited, reopened ] + types: [opened, synchronize, edited, reopened] # pipeline to execute jobs: validate: runs-on: ubuntu-latest - + steps: - - name: validate title - run: | - echo "${{ github.event.pull_request.title }}" | grep -Eq '^(feat|fix|chore|refactor|enhance|test|docs)\(.*\):.*$' && (echo "Pass"; exit 0) || (echo "Incorrect Format. Please see https://go-vela.github.io/docs/community/contributing_guidelines/#development-workflow"; exit 1) \ No newline at end of file + - name: validate title + run: | + echo "${{ github.event.pull_request.title }}" | grep -Eq '^(feat|fix|chore|refactor|enhance|test|docs)(\(.*\)|):\s.+$' && (echo "Pass"; exit 0) || (echo "Incorrect Format. Please see https://go-vela.github.io/docs/community/contributing_guidelines/#development-workflow"; exit 1)