Skip to content

Commit

Permalink
fix(preset, eslint): display short tag in release notes
Browse files Browse the repository at this point in the history
closes #313
  • Loading branch information
bravo-kernel authored and tommywo committed Sep 9, 2019
1 parent c0566ce commit b63a5ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -1,5 +1,5 @@
* {{#if message}}{{message}}{{else}}{{header}}{{/if}}

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

{{~!-- commit references --}}{{#if references}}, closes{{~#each references}} {{#if @root.linkReferences}}[{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}]({{#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}}/{{@root.issue}}/{{this.issue}}){{else}}{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}{{/if}}{{/each}}{{/if}}
2 changes: 2 additions & 0 deletions packages/conventional-changelog-eslint/writer-opts.js
Expand Up @@ -26,6 +26,8 @@ function getWriterOpts () {
return
}

commit.shortHash = commit.hash.substring(0, 7)

return commit
},
groupBy: `tag`,
Expand Down

0 comments on commit b63a5ff

Please sign in to comment.