Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/static_src/autolink.js b/static_src/autolink.js
index 5419d9c..d7ac843 100644
--- a/static_src/autolink.js
+++ b/static_src/autolink.js
@@ -1,9 +1,10 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
import {prpcClient} from 'prpc-client-instance.js';
+import {generateProjectIssueURL} from 'shared/helpers.js'
/* eslint-disable max-len */
// When crbug links don't specify a project, the default project is Chromium.
@@ -325,10 +326,12 @@
// Create custom textrun functions.
function createIssueRefRun(projectName, localId, summary, isClosed, content,
commentId) {
+ const params = {'id': localId};
+ const href = generateProjectIssueURL(projectName, '/detail', params)
return {
tag: 'a',
css: isClosed ? 'strike-through' : '',
- href: `/p/${projectName}/issues/detail?id=${localId}${commentId}`,
+ href: href + commentId,
title: summary || '',
content: content,
};