()
| 30 | * @returns {Promise<string[]>} |
| 31 | */ |
| 32 | const getChangedFiles = async () => { |
| 33 | // Determine the merge base between master and the PR branch. |
| 34 | // If files changed in master since PR was branched they would show in the diff otherwise. |
| 35 | // 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'])).trim(); |
| 37 | const result = await git.diff(['--name-only', '--no-renames', 'pr', mergeBase]); |
| 38 | return (result || '').trim().split(/\r?\n/g); |
| 39 | }; |
| 40 | |
| 41 | const getChangedMinifiedFiles = async () => { |
| 42 | const changed = await getChangedFiles(); |
no outgoing calls
no test coverage detected