[Infra] Add CI workflow to make sure pr titles are following conventions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Verify PR Title Convention" | |
on: | |
pull_request: | |
types: [opened, edited] | |
jobs: | |
check-title: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check PR title convention" | |
id: title-check | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs)(\]\[.*?\])?\]\ .+ ]]; then | |
echo "PR title does not match the required convention." | |
echo "Examples of acceptable titles:" | |
echo "[Integration][ADO] Fix missing team context for non default teams while ingesting boards" | |
echo "[Core][Logging] Fix Integration logs not being ingested" | |
echo "[Core] bump fastapi version" | |
echo "[Docs] Fix Ocean Denial of service in http-proxy-middleware in docs" | |
echo "[Integration][AWS] Added support to choose specific regions to query resources from" | |
exit 1 | |
else | |
echo "PR title matches the required convention." | |
fi |