From 00dcbc6ffa55754367daa69d920e94dad324d25d Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:10:36 -0500 Subject: [PATCH] enhance(ci): include PR title validation workflow (#344) * enhance(ci): include PR title validation workflow * update action name * include all necessary types * point to docs and add a couple extra options --- .github/workflows/pr-title-validate.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/pr-title-validate.yml diff --git a/.github/workflows/pr-title-validate.yml b/.github/workflows/pr-title-validate.yml new file mode 100644 index 00000000..f62dacf0 --- /dev/null +++ b/.github/workflows/pr-title-validate.yml @@ -0,0 +1,17 @@ +# name of the action +name: validate PR title + +# trigger on pull_request events of the opened & edited type. +on: + pull_request: + types: [ opened, synchronize, edited, reopened ] + +# pipeline to execute +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: validate + 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