Skip to content

Commit

Permalink
chore(changelog): Tweak changelog with rebase command, ignore refs in…
Browse files Browse the repository at this point in the history
… target (#1786)

* fix: ignore refs/head/ from github.ref

* chore: update changelog text with rebase command

* fix: skip merge commits as they are not informative

* chore: reorder release text to look better truncated
  • Loading branch information
antheas authored Oct 26, 2024
1 parent af729fe commit 94c4761
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
CHANGELOG_FORMAT = """\
{handwritten}
From previous `{target}` version `{prev}` there have been the following changes. **One package per new version shown.**
Visit [bazzite.gg](https://bazzite.gg) for more information and to download Bazzite.
From previous `{target}` version `{prev}` there have been the following changes. **One package per new version shown.**
### Major packages
| Name | Version |
| --- | --- |
Expand All @@ -58,6 +58,15 @@
| **[HHD](https://github.com/hhd-dev/hhd)** | {pkgrel:hhd} |
{changes}
### How to update
For current users, type the following to rebase to this version:
```bash
# For this branch (if latest):
bazzite-rollback-helper rebase {target}
# For this specific image:
bazzite-rollback-helper rebase {curr}
```
"""
HANDWRITTEN_PLACEHOLDER = """\
This is an automatically generated changelog for release `{curr}`."""
Expand Down Expand Up @@ -287,6 +296,10 @@ def get_commits(prev_manifests, manifests, workdir: str):
if not commit:
continue
hash, short, subject = commit.split(" ", 2)

if subject.lower().startswith("merge"):
continue

out += (
COMMIT_FORMAT.replace("{short}", short)
.replace("{subject}", subject)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/generate_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
- name: Get target
id: get-target
run: |
echo "target=${{ github.event.inputs.target || github.ref }}" > $GITHUB_OUTPUT
TARGET="${{ github.event.inputs.target || github.ref }}"
TARGET="${TARGET##*/}"
echo "target=$TARGET" >> $GITHUB_OUTPUT
- name: Generate Release Text
id: generate-release
Expand Down

0 comments on commit 94c4761

Please sign in to comment.