function determineBuildTargets(fileName = 'build-targets.js') {
  const filesChanged = gitDiffNameOnlyMaster();
  const buildTargets = new Set();

  targetMatchers
    .filter(matcher => filesChanged.some(matcher.func))
    .map(matcher => matcher.targets)
    .reduce((left, right) => left.concat(right), [])
    .forEach(buildTargets.add, buildTargets);

  if (buildTargets.size === 0) {
    // Default to running all test targets if no other targets are matched.
    ALL_TARGETS.forEach(buildTargets.add, buildTargets);
  }

  const targetList = Array.from(buildTargets)
    .sort()
    .join(', ');
  console.log(
    bold(yellow(`${fileName}:`)),
    'Detected build targets:',
    cyan(targetList)
  );

  return buildTargets;
}
/**
 * Populates buildTargets with a set of build targets contained in a PR after
 * making sure they are valid. Used to determine which checks to perform / tests
 * to run during PR builds.
 * @param {string} fileName
 * @return {Set<string>}
 */
Populates buildTargets with a set of build targets contained in a PR after
making sure they are valid. Used to determine which checks to perform / tests
to run during PR builds.
@param {string} fileName
@return {Set}
Populates buildTargets with a set of build targets contained in a PR after making sure they are valid . Used to determine which checks to perform / tests to run during PR builds . @param { string } fileName @return { Set }
function determineBuildTargets(fileName = 'build-targets.js') {
  const filesChanged = gitDiffNameOnlyMaster();
  const buildTargets = new Set();
  targetMatchers
    .filter(matcher => filesChanged.some(matcher.func))
    .map(matcher => matcher.targets)
    .reduce((left, right) => left.concat(right), [])
    .forEach(buildTargets.add, buildTargets);
  if (buildTargets.size === 0) {
    ALL_TARGETS.forEach(buildTargets.add, buildTargets);
  }
  const targetList = Array.from(buildTargets)
    .sort()
    .join(', ');
  console.log(
    bold(yellow(`${fileName}:`)),
    'Detected build targets:',
    cyan(targetList)
  );
  return buildTargets;
}
function determineBuildTargets ( fileName = 'build-targets.js' ) { const filesChanged = gitDiffNameOnlyMaster ( ) ; const buildTargets = new Set ( ) ; targetMatchers . filter ( matcher => filesChanged . some ( matcher . func ) ) . map ( matcher => matcher . targets ) . reduce ( ( left , right ) => left . concat ( right ) , [ ] ) . forEach ( buildTargets . add , buildTargets ) ; if ( buildTargets . size === 0 ) { ALL_TARGETS . forEach ( buildTargets . add , buildTargets ) ; } const targetList = Array . from ( buildTargets ) . sort ( ) . join ( ', ' ) ; console . log ( bold ( yellow ( ` ${ fileName } ` ) ) , 'Detected build targets:' , cyan ( targetList ) ) ; return buildTargets ; }
Populates buildTargets with a set of build targets contained in a PR after
 making sure they are valid.
Populates buildTargets with a set of build targets contained in a PR after making sure they are valid .
// Default to running all test targets if no other targets are matched.