Skip to content

Commit

Permalink
Dangerfile: Trim merge base (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Feb 12, 2021
1 parent 0feb266 commit 45b0e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const getChangedFiles = async () => {
// Determine the merge base between master and the PR branch.
// If files changed in master since PR was branched they would show in the diff otherwise.
// https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github
const mergeBase = await git.raw(['merge-base', 'pr', 'HEAD']);
const mergeBase = (await git.raw(['merge-base', 'pr', 'HEAD'])).trim();
const result = await git.diff(['--name-only', '--no-renames', 'pr', mergeBase]);
return (result || '').split(/\r?\n/g);
return (result || '').trim().split(/\r?\n/g);
};

const getChangedMinifiedFiles = async () => {
Expand Down

0 comments on commit 45b0e82

Please sign in to comment.