Skip to content

Commit 71c6bb0

Browse files
ci: Enforce Conventional Commit PR titles (#255)
Closes #254 Enforces conventional commit messages on this repository, to allow greater automation of change logs, releases etc.
1 parent e07bbe8 commit 71c6bb0

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ updates:
1313
actions:
1414
patterns:
1515
- "*"
16+
commit-message:
17+
prefix: "chore"
1618

1719
- package-ecosystem: "pip"
1820
directory: "/"
@@ -22,3 +24,5 @@ updates:
2224
dev-dependencies:
2325
patterns:
2426
- "*"
27+
commit-message:
28+
prefix: "chore"

.github/workflows/pr.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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"]'
15+
add_label: 'false'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 21. Semantic Versioning and Conventional Commits
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.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 22. Follow NEP 0029 release cycle
2+
3+
Date: 2025-05-09
4+
5+
## Status
6+
7+
Proposed
8+
9+
## Context
10+
11+
The scientific Python ecosystem, whilst continuing to move to benefit from new Python features, must maintain support for existing projects and provide a reasonable time-frame and predictability for breaking changes. Multiple libraries therefore make use of the [NEP-0029 deprecation policy](https://numpy.org/neps/nep-0029-deprecation_policy.html). We should follow suite.
12+
13+
## Decision
14+
15+
This template will follow the NEP-0029 deprecation policy.
16+
17+
## Consequences
18+
19+
The matrix of supported Python versions will be periodically updated to those expected by the policy. When versions of Python are dropped, this will be considered a Major change for the purposes of Semantic Versioning and ADR #21.

0 commit comments

Comments
 (0)