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