Skip to content

Commit

Permalink
match other closes keywords for github - fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Oct 24, 2016
1 parent 3ff219b commit a6f1d95
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
Expand Up @@ -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();

Expand Down Expand Up @@ -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 + "))";
Expand Down

0 comments on commit a6f1d95

Please sign in to comment.