Copilot commented on code in PR #7961:
URL: https://github.com/apache/hbase/pull/7961#discussion_r2963800031
##########
hbase-website/app/pages/_docs/docs/index.tsx:
##########
@@ -256,7 +256,7 @@ const renderer = toClientRenderer(
{route !== undefined && (
<a
-
href={`https://github.com/apache/hbase/${baseGithubPath}${mdxFileRoute}`}
+
href={`https://github.com/apache/hbase/edit/master/${baseGithubPath}${mdxFileRoute}`}
rel="noreferrer noopener"
target="_blank"
Review Comment:
The new GitHub URL uses `/edit/master/` but `mdxFileRoute` can be empty for
`single-page` routes and can point to a non-existent file for grouped section
roots (e.g., `/docs/architecture` resolves to `architecture.mdx` even though
the repo has `architecture/index.mdx`). In both cases this will still produce a
GitHub 404. Consider deriving the actual source file path based on the route:
use the `single-page/index.mdx` file for single-page views, and use
`${trimmedRoute}/index.mdx` (or equivalent) when the route maps to a directory
index page, so the edit link always targets a real file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]