Skip to content

Commit 61e05cf

Browse files
author
Ware, Joseph (DLSLtd,RAL,LSCI)
committed
ci: Enforce Conventional Commit messages
1 parent 002a1c5 commit 61e05cf

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/pr.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: PR Conventional Commit Validation
12+
uses: ytanikin/[email protected]
13+
with:
14+
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 3. Short descriptive title
2+
3+
Date: 2025-04-07
4+
5+
## Status
6+
7+
Proposed
8+
9+
## Context
10+
11+
The template is in a period of both upheaval and uptake, where new users may adopt its use amidst major version changes.
12+
To give some certainty to users, we should document changes and highlight important ones.
13+
As dependency management becomes more automated, we should ensure that semantic versioning is used accurately, and make allowances for automation.
14+
15+
## Decision
16+
17+
Commits to the default branch of the copier template should be made using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), and the Conventional Commit standard should be used to identify the next released version and create changelogs/release notes.
18+
19+
## Consequences
20+
21+
A [GitHub Action](https://github.com/ytanikin/PRConventionalCommits) has been configured to ensure that PRs may not be merged without being in the form of a Conventional Commit.
22+
PRs will be squash-and-merged, with the complete git history of the change preserved in the PR but only a single commit on the default branch.
23+
PR commit messages will be taken from the title and body of the PR, ensuring that the commit will be compatible with the standard.
24+
Tooling (dependabot etc.) will be configured to make compatible PRs.

0 commit comments

Comments
 (0)