Skip to content

Commit ce396cd

Browse files
committed
ci: fix cliff.toml tag casing, add PR title validation workflow
- Fix trim_start_matches to use uppercase V matching tag convention - Add comment documenting tag_pattern scope (V0.1.7+ only) - Simplify git-cliff install instructions (releases page + brew/winget) - Add PR title validation workflow using semantic-pull-request action - Add cliff.toml to .Rbuildignore
1 parent 9a0af2b commit ce396cd

4 files changed

Lines changed: 39 additions & 7 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
^\.vscode$
2525
^.*\.swp$
2626
^\.Rdata$
27+
^cliff\.toml$
2728
^doc$
2829
^Meta$

.github/workflows/pr-title.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize]
6+
branches: [main]
7+
8+
permissions:
9+
pull-requests: read
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
types: |
20+
feat
21+
fix
22+
docs
23+
style
24+
refactor
25+
perf
26+
test
27+
build
28+
ci
29+
chore
30+
revert

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,14 @@ revert — reverts an earlier commit
9898

9999
### Install git-cliff
100100

101-
```shell
102-
# pip
103-
pip install git-cliff
104-
105-
# uv
106-
uv tool install git-cliff
101+
Download a prebuilt binary from the [releases page](https://github.com/orhun/git-cliff/releases) or install via a package manager:
107102

103+
```shell
108104
# homebrew (macOS / Linux)
109105
brew install git-cliff
106+
107+
# winget (Windows)
108+
winget install git-cliff
110109
```
111110

112111
### Generate the changelog entry

cliff.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
header = ""
33
body = """
44
{% if version %}\
5-
# acro {{ version | trim_start_matches(pat="v") }}
5+
# acro {{ version | trim_start_matches(pat="V") }}
66
77
{% else %}\
88
# Unreleased
@@ -18,6 +18,8 @@ footer = ""
1818
[git]
1919
conventional_commits = true
2020
filter_unconventional = true
21+
# Only matches uppercase V tags (V0.1.7+); older lowercase tags
22+
# (v0.1.1–v0.1.6) are excluded — their NEWS.md entries were hand-written.
2123
tag_pattern = "V[0-9]+\\.[0-9]+\\.[0-9]+"
2224

2325
commit_preprocessors = [

0 commit comments

Comments
 (0)