Skip to content

Commit 4802a3a

Browse files
authored
Merge pull request #2 from TravisYeah/releases/v6-feat-no-verify
Releases/v6 feat no verify
2 parents 5f00b89 + 4d9c8c2 commit 4802a3a

File tree

14 files changed

+118
-103
lines changed

14 files changed

+118
-103
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This action will bump version, tag commit and generate a changelog with conventi
3434
- **Optional** `pre-release`: Marks the release as pre-release. Default `false`.
3535
- **Optional** `pre-release-identifier`: The identifier to use for the pre-release. Default `rc`.
3636
- **Optional** `skip-bump`: Prevents the action from bumping the version.
37+
- **Optional** `no-verify`: Run commit with `--no-verify` git option. Default `'false'`.
3738

3839
### Presets
3940
This action comes pre-compiled with the `angular` (default) and `conventionalcommits`, if you wish to use an other preset

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ inputs:
156156
default: "false"
157157
required: false
158158

159+
no-verify:
160+
description: "Run git commit with `no-verify` option."
161+
default: "false"
162+
required: false
163+
164+
159165
outputs:
160166
changelog:
161167
description: "The generated changelog for the new version"

dist/commit.hbs

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@
55
{{~header}}
66
{{~/if}}
77

8-
{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
9-
([{{shortHash}}]({{commitUrlFormat}}))
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
1022
{{~else}}
1123
{{~shortHash}}
12-
{{~/if}}{{~/if}}
24+
{{~/if}}
1325

1426
{{~!-- commit references --}}
1527
{{~#if references~}}
@@ -19,12 +31,31 @@
1931
{{~#if this.owner}}
2032
{{~this.owner}}/
2133
{{~/if}}
22-
{{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
2354
{{~else}}
2455
{{~#if this.owner}}
2556
{{~this.owner}}/
2657
{{~/if}}
27-
{{~this.repository}}{{this.prefix}}{{this.issue}}
58+
{{~this.repository}}#{{this.issue}}
2859
{{~/if}}{{/each}}
2960
{{~/if}}
3061

dist/commit1.hbs

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@
55
{{~header}}
66
{{~/if}}
77

8-
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9-
([{{shortHash}}](
10-
{{~#if @root.repository}}
11-
{{~#if @root.host}}
12-
{{~@root.host}}/
13-
{{~/if}}
14-
{{~#if @root.owner}}
15-
{{~@root.owner}}/
16-
{{~/if}}
17-
{{~@root.repository}}
18-
{{~else}}
19-
{{~@root.repoUrl}}
20-
{{~/if}}/
21-
{{~@root.commit}}/{{hash}}))
8+
{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}]({{commitUrlFormat}}))
2210
{{~else}}
2311
{{~shortHash}}
24-
{{~/if}}
12+
{{~/if}}{{~/if}}
2513

2614
{{~!-- commit references --}}
2715
{{~#if references~}}
@@ -31,31 +19,12 @@
3119
{{~#if this.owner}}
3220
{{~this.owner}}/
3321
{{~/if}}
34-
{{~this.repository}}#{{this.issue}}](
35-
{{~#if @root.repository}}
36-
{{~#if @root.host}}
37-
{{~@root.host}}/
38-
{{~/if}}
39-
{{~#if this.repository}}
40-
{{~#if this.owner}}
41-
{{~this.owner}}/
42-
{{~/if}}
43-
{{~this.repository}}
44-
{{~else}}
45-
{{~#if @root.owner}}
46-
{{~@root.owner}}/
47-
{{~/if}}
48-
{{~@root.repository}}
49-
{{~/if}}
50-
{{~else}}
51-
{{~@root.repoUrl}}
52-
{{~/if}}/
53-
{{~@root.issue}}/{{this.issue}})
22+
{{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
5423
{{~else}}
5524
{{~#if this.owner}}
5625
{{~this.owner}}/
5726
{{~/if}}
58-
{{~this.repository}}#{{this.issue}}
27+
{{~this.repository}}{{this.prefix}}{{this.issue}}
5928
{{~/if}}{{/each}}
6029
{{~/if}}
6130

dist/footer.hbs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{#if noteGroups}}
2+
{{#each noteGroups}}
3+
4+
### {{title}}
5+
6+
{{#each notes}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
8+
{{/each}}
9+
{{/each}}
10+
11+
{{/if}}

dist/footer1.hbs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +0,0 @@
1-
{{#if noteGroups}}
2-
{{#each noteGroups}}
3-
4-
### {{title}}
5-
6-
{{#each notes}}
7-
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
8-
{{/each}}
9-
{{/each}}
10-
11-
{{/if}}

dist/header.hbs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
## {{#if @root.linkCompare~}}
2-
[{{version}}]({{compareUrlFormat}})
1+
{{#if isPatch~}}
2+
##
3+
{{~else~}}
4+
#
5+
{{~/if}} {{#if @root.linkCompare~}}
6+
[{{version}}](
7+
{{~#if @root.repository~}}
8+
{{~#if @root.host}}
9+
{{~@root.host}}/
10+
{{~/if}}
11+
{{~#if @root.owner}}
12+
{{~@root.owner}}/
13+
{{~/if}}
14+
{{~@root.repository}}
15+
{{~else}}
16+
{{~@root.repoUrl}}
17+
{{~/if~}}
18+
/compare/{{previousTag}}...{{currentTag}})
319
{{~else}}
420
{{~version}}
521
{{~/if}}

dist/header1.hbs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
1-
{{#if isPatch~}}
2-
##
3-
{{~else~}}
4-
#
5-
{{~/if}} {{#if @root.linkCompare~}}
6-
[{{version}}](
7-
{{~#if @root.repository~}}
8-
{{~#if @root.host}}
9-
{{~@root.host}}/
10-
{{~/if}}
11-
{{~#if @root.owner}}
12-
{{~@root.owner}}/
13-
{{~/if}}
14-
{{~@root.repository}}
15-
{{~else}}
16-
{{~@root.repoUrl}}
17-
{{~/if~}}
18-
/compare/{{previousTag}}...{{currentTag}})
1+
## {{#if @root.linkCompare~}}
2+
[{{version}}]({{compareUrlFormat}})
193
{{~else}}
204
{{~version}}
215
{{~/if}}

dist/index.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5641,10 +5641,10 @@ const { resolve } = __nccwpck_require__(6928)
56415641

56425642
async function createWriterOpts () {
56435643
const [template, header, commit, footer] = await Promise.all([
5644-
readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'),
5645-
readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'),
5646-
readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'),
5647-
readFile(__nccwpck_require__.ab + "footer1.hbs", 'utf-8')
5644+
readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'),
5645+
readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'),
5646+
readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8'),
5647+
readFile(__nccwpck_require__.ab + "footer.hbs", 'utf-8')
56485648
])
56495649
const writerOpts = getWriterOpts()
56505650

@@ -5985,10 +5985,10 @@ async function createWriterOpts (config) {
59855985
commit,
59865986
footer
59875987
] = await Promise.all([
5988-
readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'),
5989-
readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'),
5990-
readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8'),
5991-
readFile(__nccwpck_require__.ab + "footer.hbs", 'utf-8')
5988+
readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'),
5989+
readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'),
5990+
readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'),
5991+
readFile(__nccwpck_require__.ab + "footer1.hbs", 'utf-8')
59925992
])
59935993
const writerOpts = getWriterOpts(finalConfig)
59945994

@@ -23785,9 +23785,10 @@ module.exports = new (class Git {
2378523785
*
2378623786
* @return {Promise<>}
2378723787
*/
23788-
commit = (message) => (
23789-
this.exec(`commit -m "${message}"`)
23790-
)
23788+
commit = (message, options = {}) => {
23789+
const {noVerify} = options
23790+
return this.exec(`commit -m "${message}" ${noVerify ? "--no-verify" : ""}`)
23791+
}
2379123792

2379223793
/**
2379323794
* Pull the full history
@@ -35021,6 +35022,7 @@ async function run() {
3502135022
const createSummary = core.getBooleanInput('create-summary')
3502235023
const prerelease = core.getBooleanInput('pre-release')
3502335024
const skipBump = core.getBooleanInput('skip-bump')
35025+
const noVerify = core.getBooleanInput('no-verify')
3502435026

3502535027
if (skipCi) {
3502635028
gitCommitMessage += ' [skip ci]'
@@ -35172,7 +35174,7 @@ async function run() {
3517235174
}
3517335175

3517435176
await git.add('.')
35175-
await git.commit(gitCommitMessage.replace('{version}', gitTag))
35177+
await git.commit(gitCommitMessage.replace('{version}', gitTag), {noVerify})
3517635178
}
3517735179

3517835180
// Create the new tag

dist/template.hbs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
{{> header}}
22

3-
{{#if noteGroups}}
4-
{{#each noteGroups}}
5-
6-
### ⚠ {{title}}
7-
8-
{{#each notes}}
9-
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
10-
{{/each}}
11-
{{/each}}
12-
{{/if}}
133
{{#each commitGroups}}
144

155
{{#if title}}
@@ -21,3 +11,6 @@
2111
{{/each}}
2212

2313
{{/each}}
14+
{{> footer}}
15+
16+

0 commit comments

Comments
 (0)