-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.js
41 lines (34 loc) · 927 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @copyright 2017-present, Charlike Mike Reagent <olsten.larck@gmail.com>
* @license Apache-2.0
*/
const dedent = require('dedent')
const defaultConfig = {
npmRegistry: 'https://registry.npmjs.org',
majorHeading: ':scream: BREAKING CHANGES :bangbang:',
minorHeading: ':tada: New Features',
patchHeading: ':bug: Bug Fixes',
releaseTemplate: dedent`
## [v{{nextVersion}}]({{compareLink}}) ({{date}})
### {{commit.heading}}
- {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{commit.subject}} ({{commit.anchor}})
{{#if commit.body.length}}
{{commit.body}}
{{/if}}
`,
}
/**
*
* @param {*} context
*/
module.exports = async function getConfig (context) {
let config = null
try {
config = await context.config('.github/semantic-release.yml', defaultConfig)
} catch (err) {
if (err.code !== 404) {
throw err
}
}
return Object.assign({}, defaultConfig, config)
}