Skip to content

Commit

Permalink
Merge pull request #27 from hzoo/github
Browse files Browse the repository at this point in the history
match other closes keywords for github - fixes #7
jamiebuilds authored Oct 24, 2016
2 parents 3ff219b + a6f1d95 commit e1cba29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Changelog.js
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ export default class Changelog {
const commitInfo = this.getCommitInfo();
const committers = this.getCommitters(commitInfo);
const commitsByCategory = this.getCommitsByCategory(commitInfo);
const fixesRegex = /Fix(es)? [T#](\d+)/i;
const fixesRegex = /(fix|close|resolve)(e?s|e?d)? [T#](\d+)/i;

let date = new Date().toISOString();

@@ -93,8 +93,9 @@ export default class Changelog {
markdown += "[#" + commit.number + "](" + prUrl + ") ";
}


if (commit.title.match(fixesRegex)) {
commit.title = commit.title.replace(fixesRegex, "Fixes [#$2](" + this.remote.getBaseIssueUrl() + "$2)");
commit.title = commit.title.replace(fixesRegex, "Closes [#$3](" + this.remote.getBaseIssueUrl() + "$3)");
}

markdown += commit.title + "." + " ([@" + commit.user.login + "](" + commit.user.html_url + "))";

0 comments on commit e1cba29

Please sign in to comment.