build-system/tasks/check-links.js
/**
 * Determines if a link points to a file added, copied, or renamed in the PR.
 *
 * @param {string} link Link being tested.
 * @return {boolean} True if the link points to a file introduced by the PR.
 */
Determines if a link points to a file added, copied, or renamed in the PR.
@param {string} link Link being tested.
@return {boolean} True if the link points to a file introduced by the PR.
Determines if a link points to a file added copied or renamed in the PR . @param { string } link Link being tested . @return { boolean } True if the link points to a file introduced by the PR .
function isLinkToFileIntroducedByPR(link) {
  var filesAdded =
      getStdout(`git diff --name-only --diff-filter=ARC master...HEAD`)
      .trim().split('\n');
  return filesAdded.some(function(file) {
    return (file.length > 0 && link.includes(path.parse(file).base));
  });
}
function isLinkToFileIntroducedByPR ( link ) { var filesAdded = getStdout ( ` ` ) . trim ( ) . split ( '\n' ) ; return filesAdded . some ( function ( file ) { return ( file . length > 0 && link . includes ( path . parse ( file ) . base ) ) ; } ) ; }
Determines if a link points to a file added, copied, or renamed in the PR.
Determines if a link points to a file added copied or renamed in the PR .