From 52ef8b1778755de439a1a27d8e015ff4e5366618 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 4 Dec 2024 01:30:26 -0800 Subject: [PATCH] ci: make annotations always link to file content by commit (#15573) --- scripts/utils.mjs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/utils.mjs b/scripts/utils.mjs index f3ba348784..eb22222296 100755 --- a/scripts/utils.mjs +++ b/scripts/utils.mjs @@ -1120,17 +1120,6 @@ export function getFileUrl(filename, line) { } const filePath = (cwd ? relative(cwd, filename) : filename).replace(/\\/g, "/"); - const pullRequest = getPullRequest(); - - if (pullRequest) { - const fileMd5 = createHash("sha256").update(filePath).digest("hex"); - const url = new URL(`pull/${pullRequest}/files#diff-${fileMd5}`, `${baseUrl}/`); - if (typeof line !== "undefined") { - return new URL(`R${line}`, url); - } - return url; - } - const commit = getCommit(cwd); const url = new URL(`blob/${commit}/${filePath}`, `${baseUrl}/`).toString(); if (typeof line !== "undefined") {