Skip to content

Conversation

@arzian-cd
Copy link
Contributor

what

  • Added a shared GitHub Actions workflow to validate Pull Request titles.
  • Enforces a standardized PR title format using a configurable regex.
  • Supports common prefixes such as:
    • feat, fix, docs, test, ci, refactor, chore, revert
  • Implemented as a reusable workflow using workflow_call so it can be consumed across multiple repositories.

why

  • To ensure consistent and meaningful PR titles across all repositories.
  • Helps improve:
    • Readability of PR history
    • Changelog generation
    • Release automation

how to use

Add the following workflow to your repository:

name: PR Validation

on:
  pull_request:
    types: [opened, edited, synchronize, reopened]

jobs:
  pr-title-validation:
    uses: clouddrove/github-shared-workflows/.github/workflows/pr-title-validation.yml@master

Optional: Custom Regex

You can override the default regex if your repository follows a different naming convention:

jobs:
  pr-title-validation:
    uses: clouddrove/github-shared-workflows/.github/workflows/pr-title-validation.yml@master
    with:
      regex: '^(feat|fix|docs)\([A-Z]+-[0-9]+\): '

Example Valid Titles

feat: add user authentication
fix: resolve memory leak
docs: update README

@hahirwar-cd
Copy link

Closing the PR as we already have the similar workflow pr_checks.yml
Thank you @arzian-cd for looking into it 🙏

@hahirwar-cd hahirwar-cd deleted the feat/gh-workflow-pr-check branch January 23, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants