Skip to content

Commit

Permalink
ci: Add Pull Request Title Check (#21)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

This change introduces a new GitHub Actions workflow for pull request checks. The workflow, named "Pull Request Checks," is triggered on various pull request events such as opening, editing, unlocking, labeling, synchronising, reopening, and when a pull request is ready for review.

The workflow includes a single job that checks the pull request title using the `deepakputhraya/[email protected]` action. It enforces a specific format for PR titles by allowing only certain prefixes. The allowed prefixes include:

- feat:
- fix:
- bug:
- ci:
- refactor:
- docs:
- build:
- chore(
- deps(
- chore:
- feat!:
- fix!:
- refactor!:
- test:

This standardisation of pull request titles will improve the consistency and clarity of the project's commit history and changelog.

fixes #5
  • Loading branch information
JackPlowman authored Sep 27, 2024
1 parent aa1ea11 commit c44783d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Pull Request Checks"

on:
pull_request:
types:
[
opened,
edited,
unlocked,
labeled,
synchronize,
reopened,
ready_for_review,
]

permissions:
pull-requests: write

jobs:
check-pr-title:
name: Check PR Title
runs-on: ubuntu-latest
steps:
- name: Check PR Title
uses: deepakputhraya/[email protected]
with:
allowed_prefixes: "feat: ,fix: ,bug: ,ci: ,refactor: ,docs: ,build: ,chore(,deps(,chore: ,feat!: ,fix!: ,refactor!: ,test: " # title should start with the given prefix

0 comments on commit c44783d

Please sign in to comment.