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
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| Part | Rule |
|---|---|
type | One of feat, fix, chore, docs, test, or BREAKING for breaking changes |
TICKET | Optional. A Jira-style key such as O3-4522, followed by a colon and a space |
Summary | Starts with a capital letter, a camelCase identifier such as useEffect, or a backtick-quoted token with no spaces |
| Title | Result |
|---|---|
(fix) O3-4522: Fix run report date format error | Passes |
(feat) O3-2724: Move overlays into the framework | Passes |
(BREAKING) O3-9000: Replace the public orders API contract | Passes |
(docs) Fix README examples | Passes |
(fix) useEffect dependency array handling | Passes |
(fix) `openmrsFetch` retries on 5xx responses | Passes |
(fix) O3-4522 Fix date format | Fails: no colon after the ticket |
(fix) fix date format | Fails: summary starts lowercase |
fix: Fix date format | Fails: Conventional Commits style is not accepted |
(refactor) Simplify the store | Fails: 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
| Name | Type | Default | Description |
|---|---|---|---|
pr-title required | string | The pull request title | |
pr-author-login required | string | The login of the pull request author | |
pr-author-type required | string | The type of the pull request author (e.g. User, Bot) |