Skip to content

feature: Added CI to verify proper formatting of PR titles. #7

feature: Added CI to verify proper formatting of PR titles.

feature: Added CI to verify proper formatting of PR titles. #7

Workflow file for this run

name: Verify PR Title
on:
pull_request:
types: [opened, edited, reopened]
jobs:
verify-title:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Verify PR Title
id: verify
run: |
PREFIXES="query:|.*:"
if [[ ! "${{ github.event.pull_request.title }}" =~ ^(${PREFIXES}) ]]; then
echo "PR title does not follow the required format: 'prefix: description'"
echo "::error::PR title must start with one of the following prefixes: query:, .*:"
exit 1
else
echo "PR title is valid."
fi