From 0798b651836f7c59f009d1868ca4b700b8bdfb7c Mon Sep 17 00:00:00 2001 From: Erwin Mombay Date: Thu, 19 Nov 2015 10:59:40 -0800 Subject: [PATCH] fix(tool): filter non PR merges from changelog. --- build-system/tasks/changelog.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build-system/tasks/changelog.js b/build-system/tasks/changelog.js index c1839a5f10a2..b4e90081b2ac 100644 --- a/build-system/tasks/changelog.js +++ b/build-system/tasks/changelog.js @@ -205,9 +205,15 @@ function onGitTagSuccess(gitMetadata, tag) { function onGitLogSuccess(gitMetadata, logs) { var commits = logs.split('\n'); - return commits.map(function(commit) { - return commit.split(' ')[3].slice(1); - }); + return commits + .filter(function(commit) { + // filter non Pull request merges + return commit.indexOf('Merge pull') == 0; + }) + .map(function(commit) { + // We only need the PR id + return commit.split(' ')[3].slice(1); + }); } function errHandler(err) {