Exclude reverted commits from changelog

This commit is contained in:
Laurent Cozic
2019-04-29 07:42:40 +01:00
parent 29582623b0
commit 6d68e61bbd
+12
View File
@@ -67,8 +67,20 @@ function platformFromTag(tagName) {
function filterLogs(logs, platform) {
const output = [];
const revertedLogs = [];
for (const log of logs) {
// Save to an array any commit that has been reverted, and exclude
// these from the final output array.
const revertMatches = log.message.split('\n')[0].trim().match(/^Revert "(.*?)"$/);
if (revertMatches && revertMatches.length >= 2) {
revertedLogs.push(revertMatches[1]);
continue;
}
if (revertedLogs.indexOf(log.message) >= 0) continue;
const msg = log.message.trim().toLowerCase();
let addIt = false;