Skip to Content
WorkflowsFrontend PR title check

Frontend PR title check

frontend-pr-title-check.yml fails when a pull request title does not follow the O3 convention. The convention feeds the release notes generated by Release frontend module, which group changes by title type.

This check encodes OpenMRS conventions and is opt-in. Repositories that have not adopted the convention will find most existing titles fail it.

Usage

.github/workflows/pr-title-check.yml
on: pull_request: types: [opened, edited, synchronize, reopened] jobs: pr-title: uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/frontend-pr-title-check.yml@main with: pr-title: ${{ github.event.pull_request.title }} pr-author-login: ${{ github.event.pull_request.user.login }} pr-author-type: ${{ github.event.pull_request.user.type }}

What it does

Checks the title against the accepted formats below. Titles from bot authors (type Bot, or a login ending in [bot] or -bot) are not checked. On failure, the job log lists the reason, the accepted formats and examples.

Accepted format

(type) TICKET: Summary (type) Summary
PartRule
typeOne of feat, fix, chore, docs, test, or BREAKING for breaking changes
TICKETOptional. A Jira-style key such as O3-4522, followed by a colon and a space
SummaryStarts with a capital letter, a camelCase identifier such as useEffect, or a backtick-quoted token with no spaces
TitleResult
(fix) O3-4522: Fix run report date format errorPasses
(feat) O3-2724: Move overlays into the frameworkPasses
(BREAKING) O3-9000: Replace the public orders API contractPasses
(docs) Fix README examplesPasses
(fix) useEffect dependency array handlingPasses
(fix) `openmrsFetch` retries on 5xx responsesPasses
(fix) O3-4522 Fix date formatFails: no colon after the ticket
(fix) fix date formatFails: summary starts lowercase
fix: Fix date formatFails: Conventional Commits style is not accepted
(refactor) Simplify the storeFails: refactor is not an allowed type

OpenMRS defaults

O3 repositories run this check on every pull request.

Outside OpenMRS

The allowed types and the ticket format are fixed. Use the check only if you adopt the O3 convention.

Permissions

The job needs no permissions; it only reads its inputs.

Inputs

NameTypeDefaultDescription
pr-title requiredstringThe pull request title
pr-author-login requiredstringThe login of the pull request author
pr-author-type requiredstringThe type of the pull request author (e.g. User, Bot)
Last updated on