11module . exports = {
2+ // TODO: remove this when we no longer process releases on GitLab CI
23 repositoryUrl : 'https://github.com/saltstack-formulas/template-formula' ,
34 plugins : [
45 [ '@semantic-release/commit-analyzer' , {
@@ -20,88 +21,6 @@ module.exports = {
2021 '@semantic-release/github'
2122 ] ,
2223 generateNotes : {
23- preset : 'angular' ,
24- writerOpts : {
25- // Required due to upstream bug preventing all types being displayed.
26- // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
27- // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
28- transform : ( commit , context ) => {
29- const issues = [ ]
30-
31- commit . notes . forEach ( note => {
32- note . title = 'BREAKING CHANGES'
33- } )
34-
35- // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
36- if ( commit . type === 'feat' ) {
37- commit . type = 'Features'
38- } else if ( commit . type === 'fix' ) {
39- commit . type = 'Bug Fixes'
40- } else if ( commit . type === 'perf' ) {
41- commit . type = 'Performance Improvements'
42- } else if ( commit . type === 'revert' ) {
43- commit . type = 'Reverts'
44- } else if ( commit . type === 'docs' ) {
45- commit . type = 'Documentation'
46- } else if ( commit . type === 'style' ) {
47- commit . type = 'Styles'
48- } else if ( commit . type === 'refactor' ) {
49- commit . type = 'Code Refactoring'
50- } else if ( commit . type === 'test' ) {
51- commit . type = 'Tests'
52- } else if ( commit . type === 'build' ) {
53- commit . type = 'Build System'
54- // } else if (commit.type === `chore`) {
55- // commit.type = `Maintenance`
56- } else if ( commit . type === 'ci' ) {
57- commit . type = 'Continuous Integration'
58- } else {
59- return
60- }
61-
62- if ( commit . scope === '*' ) {
63- commit . scope = ''
64- }
65-
66- if ( typeof commit . hash === 'string' ) {
67- commit . shortHash = commit . hash . substring ( 0 , 7 )
68- }
69-
70- if ( typeof commit . subject === 'string' ) {
71- let url = context . repository
72- ? `${ context . host } /${ context . owner } /${ context . repository } `
73- : context . repoUrl
74- if ( url ) {
75- url = `${ url } /issues/`
76- // Issue URLs.
77- commit . subject = commit . subject . replace ( / # ( [ 0 - 9 ] + ) / g, ( _ , issue ) => {
78- issues . push ( issue )
79- return `[#${ issue } ](${ url } ${ issue } )`
80- } )
81- }
82- if ( context . host ) {
83- // User URLs.
84- commit . subject = commit . subject . replace ( / \B @ ( [ a - z 0 - 9 ] (?: - ? [ a - z 0 - 9 / ] ) { 0 , 38 } ) / g, ( _ , username ) => {
85- if ( username . includes ( '/' ) ) {
86- return `@${ username } `
87- }
88-
89- return `[@${ username } ](${ context . host } /${ username } )`
90- } )
91- }
92- }
93-
94- // remove references that already appear in the subject
95- commit . references = commit . references . filter ( reference => {
96- if ( issues . indexOf ( reference . issue ) === - 1 ) {
97- return true
98- }
99-
100- return false
101- } )
102-
103- return commit
104- }
105- }
24+ preset : 'angular'
10625 }
10726}
0 commit comments