Skip to content

Commit

Permalink
Adding project name as part of the release template
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottKelly committed Apr 3, 2018
1 parent fd8854a commit 2cc9a1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ var argv = require("optimist").usage("git-release-notes [<options>] <since>..<un
"alias": "gitlog-option",
"default" : []
})
.options("j", {
"alias": "project"
})
.boolean("c")
.alias("c", "merge-commits")
.describe({
Expand All @@ -40,7 +43,8 @@ var argv = require("optimist").usage("git-release-notes [<options>] <since>..<un
"b": "Git branch, defaults to master",
"s": "External script to rewrite the commit history",
"c": "Only use merge commits",
"o": "Additional git log options AND ignore 'c' option"
"o": "Additional git log options AND ignore 'c' option",
"j": "Name of the project being released"
})
.boolean("version")
.check(function (argv) {
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module.exports = function module(cliOptions, positionalRange, positionalTemplate
}).then(function (commits) {
return processCommits(options, commits, positionalRange);
}).then(function (data) {
let projectName = cliOptions.j;
data.projectName = projectName;
return render(positionalRange, template, data);
});
});
Expand Down
2 changes: 1 addition & 1 deletion templates/issuelink-markdown.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release Notes
# <%= projectName %> Release Notes
## <%= range %>
<% commits.forEach(function (commit) { %>
* __[<%= commit.issue %>](<%= commit.issueLink %>) <%= commit.title %>__
Expand Down

0 comments on commit 2cc9a1f

Please sign in to comment.