Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include conventionalcommits in pre-compiled presets #247

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ This action will bump version, tag commit and generate a changelog with conventi
- **Optional** `pre-release`: Marks the release as pre-release. Default `false`.
- **Optional** `pre-release-identifier`: The identifier to use for the pre-release. Default `rc`.

### Presets
This action comes pre-compiled with the `angular` (default) and `conventionalcommits`, if you wish to use an other preset
you need to make sure it's installed with `npm install conventional-changelog-<preset name>`

### Pre-Commit hook

> Function in a specified file will be run right before the git-add-git-commit phase, when the next
Expand Down
50 changes: 13 additions & 37 deletions dist/commit1.hbs
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
* {{header}}
*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}

{{~!-- commit link --}}
{{~#if @root.linkReferences}} ([{{hash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.commit}}/{{hash}}))
{{~else if hash}} {{hash}}{{~/if}}
{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
([{{shortHash}}]({{commitUrlFormat}}))
{{~else}}
{{~shortHash}}
{{~/if}}{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
Expand All @@ -24,31 +19,12 @@
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~this.repository}}{{this.prefix}}{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

54 changes: 54 additions & 0 deletions dist/commit2.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
* {{header}}

{{~!-- commit link --}}
{{~#if @root.linkReferences}} ([{{hash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.commit}}/{{hash}}))
{{~else if hash}} {{hash}}{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

10 changes: 0 additions & 10 deletions dist/footer1.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{text}}
{{/each}}
{{/each}}
{{/if}}
10 changes: 10 additions & 0 deletions dist/footer2.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{text}}
{{/each}}
{{/each}}
{{/if}}
18 changes: 9 additions & 9 deletions dist/header1.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## {{#if isPatch~}} <small>
{{~/if~}} {{version}}
{{~#if title}} "{{title}}"
{{~/if~}}
{{~#if date}} ({{date}})
{{~/if~}}
{{~#if isPatch~}} </small>
{{~/if}}

## {{#if @root.linkCompare~}}
[{{version}}]({{compareUrlFormat}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
9 changes: 9 additions & 0 deletions dist/header2.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## {{#if isPatch~}} <small>
{{~/if~}} {{version}}
{{~#if title}} "{{title}}"
{{~/if~}}
{{~#if date}} ({{date}})
{{~/if~}}
{{~#if isPatch~}} </small>
{{~/if}}