Skip to content

Commit

Permalink
fix(changedPackages): conditionally split affects string
Browse files Browse the repository at this point in the history
AFFECTS: northbrook
  • Loading branch information
TylorS committed Jan 24, 2017
1 parent 5c5bc16 commit bf06698
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/northbrook/changedPackages/parseCommitMessage.ts
Expand Up @@ -63,7 +63,12 @@ export function parseCommitMessage(rawCommit: string): CommitMessage {
}

function splitEndOfLine(str: string): string {
return str.trim().split(EOL + EOL)[0].split(`\r\n`)[0];
str = str.trim();

if (str.indexOf(`\r\n`))
return str.split(`\r\n` + `\r\n`)[0];

return str.split(EOL + EOL)[0];
}

function getAffects(messageBody: string) {
Expand Down

0 comments on commit bf06698

Please sign in to comment.