Skip to content

Commit

Permalink
feat: Support multiple git-path config option
Browse files Browse the repository at this point in the history
  • Loading branch information
jed-li2022 committed May 9, 2024
1 parent f04dac1 commit 9d0ca03
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 97 deletions.
41 changes: 5 additions & 36 deletions dist/commit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,11 @@
{{~header}}
{{~/if}}

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

{{~!-- commit references --}}
{{~#if references~}}
Expand All @@ -31,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}}

41 changes: 36 additions & 5 deletions dist/commit1.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@
{{~header}}
{{~/if}}

{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
([{{shortHash}}]({{commitUrlFormat}}))
{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{shortHash}}](
{{~#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}}
{{~shortHash}}
{{~/if}}{{~/if}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
Expand All @@ -19,12 +31,31 @@
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
{{~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.prefix}}{{this.issue}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

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

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}

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

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}

{{/if}}
20 changes: 2 additions & 18 deletions dist/header.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
## {{#if @root.linkCompare~}}
[{{version}}]({{compareUrlFormat}})
{{~else}}
{{~version}}
{{~/if}}
Expand Down
20 changes: 18 additions & 2 deletions dist/header1.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
## {{#if @root.linkCompare~}}
[{{version}}]({{compareUrlFormat}})
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
Expand Down
18 changes: 9 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5520,10 +5520,10 @@ const { resolve } = __nccwpck_require__(1017)

async function createWriterOpts () {
const [template, header, commit, footer] = await Promise.all([
readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "footer.hbs", 'utf-8')
readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "footer1.hbs", 'utf-8')
])
const writerOpts = getWriterOpts()

Expand Down Expand Up @@ -5864,10 +5864,10 @@ async function createWriterOpts (config) {
commit,
footer
] = await Promise.all([
readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "footer1.hbs", 'utf-8')
readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8'),
readFile(__nccwpck_require__.ab + "footer.hbs", 'utf-8')
])
const writerOpts = getWriterOpts(finalConfig)

Expand Down Expand Up @@ -34828,7 +34828,7 @@ async function run() {
const conventionalConfigFile = core.getInput('config-file-path')
const preChangelogGenerationFile = core.getInput('pre-changelog-generation')
const gitUrl = core.getInput('git-url')
const gitPath = core.getInput('git-path')
const gitPath = core.getMultilineInput('git-path')
const infile = core.getInput('input-file')
const skipCi = core.getBooleanInput('skip-ci')
const createSummary = core.getBooleanInput('create-summary')
Expand Down
13 changes: 10 additions & 3 deletions dist/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{{> header}}

{{#if noteGroups}}
{{#each noteGroups}}

### ⚠ {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}
{{/if}}
{{#each commitGroups}}

{{#if title}}
Expand All @@ -11,6 +21,3 @@
{{/each}}

{{/each}}
{{> footer}}


13 changes: 3 additions & 10 deletions dist/template1.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{{> header}}

{{#if noteGroups}}
{{#each noteGroups}}

### ⚠ {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}
{{/if}}
{{#each commitGroups}}

{{#if title}}
Expand All @@ -21,3 +11,6 @@
{{/each}}

{{/each}}
{{> footer}}


4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function run() {
const conventionalConfigFile = core.getInput('config-file-path')
const preChangelogGenerationFile = core.getInput('pre-changelog-generation')
const gitUrl = core.getInput('git-url')
const gitPath = core.getInput('git-path')
const gitPath = core.getMultilineInput('git-path')
const infile = core.getInput('input-file')
const skipCi = core.getBooleanInput('skip-ci')
const createSummary = core.getBooleanInput('create-summary')
Expand Down

0 comments on commit 9d0ca03

Please sign in to comment.