Skip to content

Commit

Permalink
add verify-pr-title.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch committed Nov 10, 2024
1 parent 71f483e commit c5db307
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/verify-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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

0 comments on commit c5db307

Please sign in to comment.