-
-
Notifications
You must be signed in to change notification settings - Fork 13
Let the user specify a per-commit template #9
Comments
This should be relatively easy to implement: const line = template
.replace('{hash}', commit.slice(0, 8))
.replace('{title}', commit.slice(40))
.replace('{url}', GITHUB_SERVER_URL + '/'+ GITHUB_REPOSITORY + '/commit/' + commit.slice(0, 40));
releaseBody.push(line); |
I suppose we can get |
Those are ENVs, immediately available, no need to execute |
Heck, most options could be replaced by the template: with:
header: '### Changelog'
footer: '❤️'
include-range: true with:
template: |
### Changelog
{commits}
{range}
❤️ The advantage being that it provides real customization instead of just what we allow. Example currently impossible: with:
commit-template: '{title} ← {hash}'
template: |
{commits}
Full diff: {range} |
with:
include-range: false would become: with:
template: '{commits}' |
Was thinking about the same, but left it out as commits were variable length, and require template from other variable. Well, this is fine too. |
At this point |
To be fair that action is kinda meaningless without a way to create the changelog. Its own example includes a static changelog text. |
It looks deliberately made generic, so that people input changelog from outputs of their own actions (you see where I'm going), making the workflow file >100 lines in the name of "composability". About this, I'm not sure if GitHub would be inclined to include an external dependency in their core actions. Or building a changelog parser of their own for that matter. |
Instead of using
include-hash
, this could allow a per-commit template so the user can customize it freelyThe text was updated successfully, but these errors were encountered: