Skip to Content
WorkflowsFrontend PR description check

Frontend PR description check

frontend-pr-description-check.yml fails when a pull request description does not follow the O3 pull request template.

This check encodes OpenMRS conventions and is opt-in. It expects the O3 pull request template’s headings and checklist.

Usage

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

What it does

Descriptions from bot authors (type Bot, or a login ending in [bot] or -bot) are not checked. Otherwise the description must meet every rule:

RuleDetail
Not emptyAn empty description fails.
Required headingsMarkdown headings (any level) named Requirements, Summary, Screenshots, Related Issue and Other.
First checkbox checkedThe first - [ ] checkbox in the description must be checked (- [x]). In the template it is the first Requirements item.
Summary has contentThe Summary section must contain text other than blank lines and HTML comments, so the template’s placeholder comment does not count.

A description that passes:

## Requirements - [x] This PR has a title that briefly describes the work done. ## Summary Fixes the date format in the run report. ## Screenshots ## Related Issue https://openmrs.atlassian.net/browse/O3-4522 ## Other

OpenMRS defaults

O3 repositories run this check on every pull request, alongside the PR title check.

Outside OpenMRS

The headings are fixed. Use the check only if your pull request template has the same five sections and a checklist whose first item authors must tick.

Permissions

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

Inputs

NameTypeDefaultDescription
pr-body requiredstringThe pull request body
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