Skip to content

Commit a80c538

Browse files
committed
ci: fix changelog template and release labels
1 parent 6456a39 commit a80c538

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.releaserc/commit.hbs

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@
5757
{{~/if}}
5858
{{~this.repository}}#{{this.issue}}
5959
{{~/if}}{{/each}}
60-
{{~/if}}
60+
{{~/if}}
61+

.releaserc/footer.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
### {{title}}
55

66
{{#each notes}}
7-
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
88
{{/each}}
99
{{/each}}
1010

11-
{{/if}}
11+
{{/if}}

.releaserc/header.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
{{~#if title}} "{{title}}"
2323
{{~/if}}
2424
{{~#if date}} ({{date}})
25-
{{/if}}
25+
{{/if}}

release.config.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const path = require('path');
77

88
// Get env vars
99
const ref = process.env.GITHUB_REF;
10+
const serverUrl = process.env.GITHUB_SERVER_URL;
11+
const repository = process.env.GITHUB_REPOSITORY;
12+
const repositoryUrl = serverUrl + '/' + repository;
1013

1114
// Declare params
1215
const resourcePath = './.releaserc/';
@@ -84,6 +87,8 @@ async function config() {
8487
}],
8588
["@semantic-release/github", {
8689
successComment: getReleaseComment(),
90+
labels: ['type:ci'],
91+
releasedLabels: ['state:released<%= nextRelease.channel ? `-\${nextRelease.channel}` : "" %>']
8792
}],
8893
],
8994
};
@@ -103,7 +108,8 @@ async function readFile(filePath) {
103108
}
104109

105110
function getReleaseComment() {
106-
const comment = '🎉 This issue has been resolved in version [${nextRelease.version}](<github_release_url>)';
111+
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
112+
const comment = '🎉 This pull request has been released in version [${nextRelease.version}](' + url + ')';
107113
return comment;
108114
}
109115

0 commit comments

Comments
 (0)