Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Add CI workflow to make sure pr titles are following conventions #1135

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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|CI|Infra)\]\ .+ ]]; then
echo "PR title does not match the required convention."
echo "Examples of acceptable titles:"
echo "[Integration] Resolve missing team context in board ingestion for non-default teams"
echo "[Core] Ensure ingestion of integration logs"
echo "[Core] Upgrade FastAPI version to improve performance and compatibility"
echo "[Docs] Correct documentation on Ocean's denial-of-service vulnerability in http-proxy-middleware"
echo "[Integration] Enable region-specific resource querying support"
exit 1
else
echo "PR title matches the required convention."
fi