Skip to content

Commit 190990d

Browse files
authored
Merge pull request #2 from VirdocsSoftware/project-name
Adding project name as part of the release template
2 parents fd8854a + 2cc9a1f commit 190990d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

cli.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ var argv = require("optimist").usage("git-release-notes [<options>] <since>..<un
2929
"alias": "gitlog-option",
3030
"default" : []
3131
})
32+
.options("j", {
33+
"alias": "project"
34+
})
3235
.boolean("c")
3336
.alias("c", "merge-commits")
3437
.describe({
@@ -40,7 +43,8 @@ var argv = require("optimist").usage("git-release-notes [<options>] <since>..<un
4043
"b": "Git branch, defaults to master",
4144
"s": "External script to rewrite the commit history",
4245
"c": "Only use merge commits",
43-
"o": "Additional git log options AND ignore 'c' option"
46+
"o": "Additional git log options AND ignore 'c' option",
47+
"j": "Name of the project being released"
4448
})
4549
.boolean("version")
4650
.check(function (argv) {

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = function module(cliOptions, positionalRange, positionalTemplate
2020
}).then(function (commits) {
2121
return processCommits(options, commits, positionalRange);
2222
}).then(function (data) {
23+
let projectName = cliOptions.j;
24+
data.projectName = projectName;
2325
return render(positionalRange, template, data);
2426
});
2527
});

templates/issuelink-markdown.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Release Notes
1+
# <%= projectName %> Release Notes
22
## <%= range %>
33
<% commits.forEach(function (commit) { %>
44
* __[<%= commit.issue %>](<%= commit.issueLink %>) <%= commit.title %>__

0 commit comments

Comments
 (0)