scripts.release.release_notes¶
Render Markdown release notes from the commits between two git refs.
Usage: uv run python -m scripts.release.release_notes <tag> [<previous-tag>]
Used by the release job in .github/workflows/ci.yml: every push to
main builds ghcr.io/rewake-fr/api:sha-<short> and publishes a GitHub
Release with that same tag, whose notes are this script’s output for
<previous-tag>..HEAD. Without a previous tag (the very first release)
only the last FIRST_RELEASE_MAX_COMMITS commits are listed.
Commits are grouped by their Conventional Commits type (feat(pdf): ...
-> “Nouveautés”, scope shown in bold); anything unprefixed lands in
“Autres changements”. A type!: subject or a BREAKING CHANGE:
footer is also listed under “Changements cassants”, with the footer’s
text – that’s where an operator learns about e.g. a removed environment
variable before deploying. Merge commits are skipped.
Any @word in commit text is wrapped in backticks: GitHub turns a bare
@page (a CSS at-rule in a real commit subject here) into a mention of
the GitHub user “page” and lists them as a release contributor.
Attributes¶
Classes¶
Functions¶
|
|
|
|
|
|
|
Module Contents¶
- scripts.release.release_notes.IMAGE = 'ghcr.io/rewake-fr/api'¶
- scripts.release.release_notes.FIRST_RELEASE_MAX_COMMITS = 30¶
- scripts.release.release_notes.SECTIONS: list[tuple[str, str]] = [('feat', 'Nouveautés'), ('fix', 'Corrections'), ('perf', 'Performances'), ('refactor',...¶
- class scripts.release.release_notes.Commit¶
- sha: str¶
- type: str¶
- scope: str | None¶
- text: str¶
- breaking: str | None¶
- scripts.release.release_notes.render(commits: collections.abc.Sequence[Commit], tag: str, previous_tag: str | None, repository: str | None = None) str¶
- scripts.release.release_notes.main(argv: collections.abc.Sequence[str] | None = None) int¶