MCPcopy
hub / github.com/ampproject/amphtml / isLinkToFileIntroducedByPR

Function isLinkToFileIntroducedByPR

build-system/tasks/check-links.js:85–89  ·  view source on GitHub ↗

* 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.

(link)

Source from the content-addressed store, hash-verified

83 * @return {boolean} True if the link points to a file introduced by the PR.
84 */
85function isLinkToFileIntroducedByPR(link) {
86 return filesIntroducedByPr.some((file) => {
87 return file.length > 0 && link.includes(path.parse(file).base);
88 });
89}
90
91/**
92 * Checks a given markdown file for dead links.

Callers 1

checkLinksInFileFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected