Skip to content

Commit

Permalink
adjust merged pull requests to match style
Browse files Browse the repository at this point in the history
  • Loading branch information
piuccio committed Mar 2, 2018
1 parent 6c72b0c commit e42d579
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 13 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
package-lock.json
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function getOptions (callback) {
t: stored.t || stored.title || argv.t,
i: stored.i || stored.ignoreCase || argv.i,
m: stored.m || stored.meaning || argv.m,
o: stored.o || stored.gitlogOption || argv.o,
p: stored.p || stored.path || argv.p,
c: stored.c || stored.mergeCommits || argv.c
};
Expand Down
16 changes: 8 additions & 8 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ var parser = require("debug")("release-notes:parser");

exports.log = function (options, callback) {
var spawn = require("child_process").spawn;
var addOpts = options.mergeCommits ? "--merges" : "--no-merges";
var gitArgs = ["log", "--no-color"]
if (options.additionalOptions.length > 0) {
options.additionalOptions.forEach(function(o) {
gitArgs.push("--" + o);
})
}
else {
gitArgs.push (addOpts)
});
} else {
gitArgs.push(options.mergeCommits ? "--merges" : "--no-merges");
}
gitArgs.push ("--branches=" + options.branch);
gitArgs.push ("--format=" + formatOptions);
gitArgs.push (options.range);
gitArgs.push(
"--branches=" + options.branch,
"--format=" + formatOptions,
options.range
);
debug("Spawning git with args %o", gitArgs);
var gitLog = spawn("git", gitArgs, {
cwd : options.cwd,
Expand Down
50 changes: 50 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"version": "2.1.0",
"dependencies": {
"date-fns": "^1.28.4",
"debug": "^2.6.0",
"date-fns": "^1.29.0",
"debug": "^3.1.0",
"ejs": "^2.5.7",
"optimist": "^0.6.1"
},
Expand All @@ -39,7 +39,7 @@
"homepage": "https://github.com/ariatemplates/git-release-notes",
"preferGlobal": true,
"devDependencies": {
"cross-env": "^5.0.5",
"eslint": "^4.5.0"
"cross-env": "^5.1.3",
"eslint": "^4.18.1"
}
}

0 comments on commit e42d579

Please sign in to comment.