diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0407ce..bdd3c8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,9 @@ jobs: with: config: cliff.toml args: --latest --strip header + env: + # Lets git-cliff resolve commit authors to GitHub handles/avatars. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create GitHub release uses: softprops/action-gh-release@v2 diff --git a/cliff.toml b/cliff.toml index 8a2dbbf..b88b9d8 100644 --- a/cliff.toml +++ b/cliff.toml @@ -8,12 +8,11 @@ body = """ - {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | split(pat="\n") | first }} {% endfor %} {% endfor %}\ -{% set contributors = commits | map(attribute="author.name") | unique | sort -%} -{% if contributors | length > 0 %} +{% if github.contributors | length > 0 %} ### 👥 Contributors -{% for name in contributors %}\ -- {{ name }} +{% for contributor in github.contributors | sort(attribute="username") %}\ +- [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) {% endfor %} {% endif %}\ """ @@ -47,3 +46,7 @@ commit_parsers = [ filter_commits = true tag_pattern = "v[0-9].*" sort_commits = "oldest" + +[remote.github] +owner = "imcf" +repo = "patchworks"