Compare commits

...

4 Commits

Author SHA1 Message Date
Alice Bowman
686a28a2ab style: changelog updates 2024-08-26 12:34:44 +02:00
Alice Bowman
d81733a99e feat: changelog workflow 2024-08-26 10:36:24 +02:00
Alice Bowman
e809e226da workflow: fixed typo on doc-upload 2024-08-23 12:42:36 +02:00
Alice Bowman
3cd607774a documentation: added gitcliff and modified template 2024-08-23 12:35:27 +02:00
4 changed files with 1588 additions and 1 deletions

34
.github/workflows/changelog.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Changelog Update
on:
pull_request:
types: [opened, synchronize]
jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions/setup-rust@v1
with:
rust-version: stable
- name: Install git-cliff
run: cargo install git-cliff
- name: Generate Changelog
run: |
git-cliff --config cliff.toml > CHANGELOG.md
git add CHANGELOG.md
- name: Commit and Push Changes
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git commit -m "chore: update changelog" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref }}

View File

@@ -46,4 +46,4 @@ jobs:
author_email: actions@github.com
message: Update docs
cwd: rosenpass-website/static/docs
github_token: ${{ secrets.PRIVACC }
github_token: ${{ secrets.PRIVACC }}

1454
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

99
cliff.toml Normal file
View File

@@ -0,0 +1,99 @@
# https://git-cliff.org/docs/configuration
[changelog]
# template for the changelog header
header = """
---
title: ""
linkTitle: "Changelog"
weight: 5
menu: false
type: docs
---
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
<div class="changelog-container card card-body">
<div class="h3 changelog-release">• {{ version | trim_start_matches(pat="v") }} <span class="text-muted">{{ timestamp | date(format="%Y-%m-%d") }}<span> &nbsp;-&nbsp; <a href="{{ commit_id}}" class="">{{ commit_id | truncate(length=7, end="") }}</a></div>\
{% else %}\
<div class="changelog-container card card-body">
<div class="h3 changelog-release">• unreleased / untagged</div>
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
<p>
<button class="btn btn-primary changelog" type="button" data-toggle="collapse" data-target="#{{ group | reverse| truncate(length=5, end="") }}{{ timestamp }}" aria-expanded="false" aria-controls="{{ group | reverse | truncate(length=5, end="") }}{{ timestamp }}">
<div class="h4"> {{ group | upper_first }} <i class="fa-solid fa-sort-down"></i></div>
</button>
</p>
<div class="collapse changelog" id="{{ group | reverse | truncate(length=5, end="") }}{{ timestamp }}">
<div class="card card-body">
{% for commit in commits %}
<div class="changelog-commit row">
<div class="col-4 col-sm-3 col-lg-2 commit-id"> - <a href="https://github.com/rosenpass/rosenpass/commit/{{ commit.id }}">{{ commit.id | truncate(length=7, end="") }}</a></div><div class="col-8 col-md-8 commit-message"> {{ commit.message | upper_first }}</div>
</div>
{% endfor %}\
</div>
</div>
{% endfor %}\n
</div>
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for parsing and grouping commits
commit_parsers = [
{ message = "Release rosenpass version", group = "<!-- 0 -->📝 Release" },
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc|Documentation|Doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 --> Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ field = "author.name", pattern = "dependabot", skip = true },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore: update changelog", skip = true }, # New rule to skip changelog commits
{ body = ".*security", group = "<!-- 7 -->🛡 Security" },
{ message = "^revert", group = "<!-- 8 --> Revert" },
# Catch-all for uncategorized commits
{ message = ".*", group = "<!-- 9 -->📦 Miscellaneous Tasks" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "newest"