Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5acddbc7c6 | |||
|
bfa7280ab3
|
|||
| 351303db0f | |||
|
e8426bb839
|
|||
| bb6e1d44b8 | |||
|
f54df9fbc4
|
|||
| f1541e7d5d | |||
|
65462f5a14
|
|||
| fa1a8673f6 | |||
|
d08cc144ed
|
|||
| 073026d7c9 | |||
|
94980be3e5
|
20
CHANGELOG.md
20
CHANGELOG.md
@@ -2,6 +2,26 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [1.1.0](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v1.0.1..v1.1.0) - 2025-09-29
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- *(scripts)* Add type extraction and mismatch detection logic - ([e8426bb](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/e8426bb839dd29f807f232efe5f7bf829ec4f9f1))
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- Add changelog improvement ideas to TODO file - ([f54df9f](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/f54df9fbc42e3fc453042a1f2c36f7cd12e38c41))
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(config)* Improve child commit handling in merge template - ([65462f5](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/65462f5a1495aa45afd727a962126db953ab75a5))
|
||||||
|
|
||||||
|
## [1.0.1](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v1.0.0..v1.0.1) - 2025-09-27
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(scripts)* Check for existing Python installation - ([94980be](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/94980be3e5e5827b75edf9abeab0987709fa3122))
|
||||||
|
|
||||||
## [1.0.0](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.3..v1.0.0) - 2025-09-27
|
## [1.0.0](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.3..v1.0.0) - 2025-09-27
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
|||||||
46
TODO.md
Normal file
46
TODO.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# TODO
|
||||||
|
|
||||||
|
## Git-Cliff / Changelog Improvements
|
||||||
|
|
||||||
|
### Idea: Use Merge Commit Body as Documentation
|
||||||
|
|
||||||
|
* **Context**: Normally, only the commit subject is included in changelogs.
|
||||||
|
* **Idea**: Treat merge commits as *project documentation*.
|
||||||
|
|
||||||
|
* The subject line = headline of the feature / branch.
|
||||||
|
* The body = narrative explanation of what the branch accomplished.
|
||||||
|
* Child commits = detailed steps, already included under the merge.
|
||||||
|
|
||||||
|
### Benefits
|
||||||
|
|
||||||
|
* Provides more context for each feature branch.
|
||||||
|
* Turns the changelog into a lightweight project documentation.
|
||||||
|
* Keeps individual commits small and clean while still showing the bigger picture.
|
||||||
|
* Optional: if no body is present, nothing changes.
|
||||||
|
|
||||||
|
### Possible Implementation
|
||||||
|
|
||||||
|
* In the changelog template:
|
||||||
|
|
||||||
|
* Detect merge commits.
|
||||||
|
* Render `commit.body` below the subject line.
|
||||||
|
* Indent and format properly (e.g. bullet points preserved).
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- 🔀 **Merge branch 'feature/oauth2'** - ([abc1234](...))
|
||||||
|
Add OAuth2 login flow with full explanation of scope:
|
||||||
|
- why OAuth2 was chosen
|
||||||
|
- compatibility with existing login
|
||||||
|
- possible future extensions
|
||||||
|
|
||||||
|
- *(auth)* Add login endpoint - ([def5678](...))
|
||||||
|
- *(auth)* Implement token exchange - ([ghi9012](...))
|
||||||
|
- *(auth)* Add error handling - ([jkl3456](...))
|
||||||
|
- *(test)* Add unit tests for OAuth2 flow - ([mno7890](...))
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
14
cliff.toml
14
cliff.toml
@@ -40,12 +40,14 @@ body = """
|
|||||||
{% if commit.merge_commit %}\
|
{% if commit.merge_commit %}\
|
||||||
- 🔀 **{{ commit.message | upper_first }}** - \
|
- 🔀 **{{ commit.message | upper_first }}** - \
|
||||||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||||
{% for child in commit.extra.children %}
|
{% if commit.extra and commit.extra.children %}\
|
||||||
{{ " " | safe }}- {% if child.scope %}*({{ child.scope }})* {% endif %}\
|
{% for child in commit.extra.children %}
|
||||||
{% if child.breaking %}[**breaking**] {% endif %}\
|
{{ " " | safe }}- {% if child.scope %}*({{ child.scope }})* {% endif %}\
|
||||||
{{ child.message | upper_first }} - \
|
{% if child.breaking %}[**breaking**] {% endif %}\
|
||||||
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
{{ child.message | upper_first }} - \
|
||||||
{% endfor %}\
|
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
||||||
|
{% endfor %}\
|
||||||
|
{% endif %}\
|
||||||
{% else %}\
|
{% else %}\
|
||||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||||
{% if commit.breaking %}[**breaking**] {% endif %}\
|
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
import json
|
import json
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
def extract_type(raw_message: str) -> str | None:
|
||||||
|
m = re.match(r"^(\w+)(?:\([^)]+\))?:", raw_message.strip())
|
||||||
|
return m.group(1) if m else None
|
||||||
|
|
||||||
def git_commits_between(parent, merge):
|
def git_commits_between(parent, merge):
|
||||||
"""Return list of commit hashes between parent and merge (exclusive of parent, inclusive of merge)."""
|
"""Return list of commit hashes between parent and merge (exclusive of parent, inclusive of merge)."""
|
||||||
@@ -34,6 +39,8 @@ def main(path=None):
|
|||||||
).strip().split()
|
).strip().split()
|
||||||
merge_id, *parent_ids = parents
|
merge_id, *parent_ids = parents
|
||||||
|
|
||||||
|
parent_type = extract_type(c["raw_message"])
|
||||||
|
|
||||||
if len(parent_ids) >= 2:
|
if len(parent_ids) >= 2:
|
||||||
mainline = parent_ids[0]
|
mainline = parent_ids[0]
|
||||||
children_ids = git_commits_between(mainline, merge_id)
|
children_ids = git_commits_between(mainline, merge_id)
|
||||||
@@ -41,7 +48,13 @@ def main(path=None):
|
|||||||
children = []
|
children = []
|
||||||
for cid in children_ids:
|
for cid in children_ids:
|
||||||
if cid in commits_by_id:
|
if cid in commits_by_id:
|
||||||
children.append(commits_by_id[cid])
|
child = commits_by_id[cid]
|
||||||
|
child_type = extract_type(child["raw_message"])
|
||||||
|
if child_type and parent_type and child_type != parent_type:
|
||||||
|
if not child.get("extra") or not isinstance(child["extra"], dict):
|
||||||
|
child["extra"] = {}
|
||||||
|
child["extra"]["mismatch_type"] = child_type
|
||||||
|
children.append(child)
|
||||||
consumed.add(cid)
|
consumed.add(cid)
|
||||||
|
|
||||||
if not c.get("extra") or not isinstance(c["extra"], dict):
|
if not c.get("extra") or not isinstance(c["extra"], dict):
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
# Usage: sudo ./install-python.sh
|
# Usage: sudo ./install-python.sh
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
if command -v python3 >/dev/null 2>&1; then
|
||||||
|
echo "ℹ️ Python $(python3 --version) is already installed"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt install -y python3
|
apt install -y python3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user