Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git trailers #355

Merged
merged 3 commits into from
Feb 28, 2025
Merged

Git trailers #355

merged 3 commits into from
Feb 28, 2025

Conversation

dacav
Copy link
Contributor

@dacav dacav commented Feb 28, 2025

We are leveraging git trailers to automate the additions to the NEWS file during release.

Commits having the Changelog trailers are checked automatically, to enforce the use of a restricted set of values.

The checks can be used as commit hooks during development. They're compatible by design.

contrib/hooks now contains a collection of git hooks that the developer can use
to get faster feedback.

contrib/hooks-setup is a script that allows the developer to do a quick set up
of the provided hook. It is intended to be executed right after cloning the repo.

The contrib/hooks/commit-msg hook checks the commit message to ensure
that the git trailers in use are allowed, that is they are listed in
contrib/allowed-trailers.txt.
We are going to enforce the use of git trailers, as we want to automate the
construction of a changelog.  See git-interpret-trailers(1).

The check is achieved by running the contrib/hooks/commit-msg script on
the individual commits that constitute the pull request.
Leveraging the git trailers, we have now a tool that builds
the content of the NEWS file directly from the git history.
@dacav dacav requested a review from LDVG February 28, 2025 12:14
@dacav dacav merged commit d46d229 into main Feb 28, 2025
31 checks passed
@dacav dacav deleted the enforce-git-trailers-ci branch February 28, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants