Skip to content

ci: add a PR title check action #13

Closed

Description

@uniqueg

Summary

Add a composite action actions/pr-title that checks PR titles against the org convention. Each repo calls it from a thin pr-title.yml.

Rule

The check covers the whole title, not only the subject:

  • format <type>[(scope)][!]: <description> (Conventional Commits; allowed types as configured, e.g. build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test);
  • at most 50 characters in total;
  • no trailing period.

The current check in cloud-components (elixir-cloud-aai/cloud-components#474, using amannn/action-semantic-pull-request) limits only the subject to 50 characters, so a title like feat(access-control): … can reach about 72 characters.

Implementation

  • A small script in a run: step reads github.event.pull_request.title through env: (never interpolated into the script). This replaces the third-party action, needs no token and lets us match the convention exactly.
  • Error messages say which rule failed and show the title's length.
  • Tests in the .github CI (set up in the blocking issue) cover good and bad titles: too long, wrong type, missing colon or space, trailing period, scope, !.

Per-repo caller

.github/workflows/pr-title.yml with:

  • name: PR title;
  • the trigger pull_request with types opened, edited, synchronize, reopened, ready_for_review;
  • permissions: {};
  • one job title named PR title, skipped for Dependabot PRs with a job-level if:. Dependabot's titles, such as ci: bump the github-actions group …, often exceed 50 characters, and a skipped job satisfies a required check;
  • the step uses: elixir-cloud-aai/.github/actions/pr-title@<sha> # vX.Y.Z.

The workflow template (workflow-templates/pr-title.yml) moved to #17: it pins the action by a release commit, which only exists after the first release.

Why not a reusable workflow: the check would be named PR title / <job>, and skipping the caller for Dependabot would leave the nested required check pending. Why not a ruleset "require workflows" rule: those only run on the default pull_request activity types, so fixing a title (edited) would not re-run the check.

Rollout (after release)

  1. Tag a release of .github with the action.
  2. cloud-components: switch the pr-title.yml from #474 to the action.
  3. foca, cloud-registry, proTES, trs-filer and cloud-registry-ui (branch ai): add pr-title.yml.
  4. In each repo, add PR title to the ruleset after the check has reported once on a PR. A maintainer does this switch.

The per-repo rollout PRs are tracked in each repo, not here.

Part of the parent issue on sharing workflow steps as composite actions.

Activity

  1. added
    priority: medium
    status: blocked
    type: ci / cd
    workload: hours
    on Oct 27, 2026
  2. added
    status: in progress
    and removed
    status: blocked
    on Oct 28, 2026
  3. removed
    status: in progress
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: ci / cdworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions