Skip to content

Commit 45b0e82

Browse files
Dangerfile: Trim merge base (#2761)
1 parent 0feb266 commit 45b0e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dangerfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const getChangedFiles = async () => {
3333
// Determine the merge base between master and the PR branch.
3434
// If files changed in master since PR was branched they would show in the diff otherwise.
3535
// https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github
36-
const mergeBase = await git.raw(['merge-base', 'pr', 'HEAD']);
36+
const mergeBase = (await git.raw(['merge-base', 'pr', 'HEAD'])).trim();
3737
const result = await git.diff(['--name-only', '--no-renames', 'pr', mergeBase]);
38-
return (result || '').split(/\r?\n/g);
38+
return (result || '').trim().split(/\r?\n/g);
3939
};
4040

4141
const getChangedMinifiedFiles = async () => {

0 commit comments

Comments
 (0)