Skip to content

Commit c164faa

Browse files
committed
build: skip reverted revert commits
1 parent 87d5c40 commit c164faa

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

release/monorepo-setup.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ async function filterCommits(path, regex, pluginConfig, commits) {
2121
return revertRegexSubject.test(commit.subject);
2222
})
2323
.map((commit) => {
24-
console.log({
25-
commit,
26-
revertRegexBody,
24+
const match = commit.body.match(revertRegexBody);
25+
if (Array.isArray(match)) {
26+
return match[1];
27+
}
2728

28-
})
29-
const [_, reverted] = commit.body.match(revertRegexBody);
30-
return reverted;
29+
return commit.hash;
3130
});
3231

3332
// Do the same as it did for revertedCommits, but instead of checking for

0 commit comments

Comments
 (0)