From 4af7bc8090e41da6c30df62b50694c7cb8f6a63f Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Thu, 4 Feb 2021 14:30:56 +0100 Subject: [PATCH] Docs: Use /blob/ instead of /tree/ for direct query link It doesn't have a huge impact, since there is a working redirect in place, but still more correct to use /blob/ :) For example, https://github.com/github/codeql/tree/main/python/ql/src/Security/CWE-094/CodeInjection.ql redirects to https://github.com/github/codeql/blob/main/python/ql/src/Security/CWE-094/CodeInjection.ql --- docs/codeql/query-help-markdown.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codeql/query-help-markdown.py b/docs/codeql/query-help-markdown.py index 9313d4b170d..350c9aefce2 100644 --- a/docs/codeql/query-help-markdown.py +++ b/docs/codeql/query-help-markdown.py @@ -188,10 +188,10 @@ for lang in languages: # Build a link to the query source file for display in the query help if "go" in prefix_repo_nwo(queryfile): transform_link = prefix_repo_nwo(queryfile).replace( - "codeql-go", "codeql-go/tree/main").replace(" ", "%20").replace("\\", "/") + "codeql-go", "codeql-go/blob/main").replace(" ", "%20").replace("\\", "/") else: transform_link = prefix_repo_nwo(queryfile).replace( - "codeql", "codeql/tree/main").replace(" ", "%20").replace("\\", "/") + "codeql", "codeql/blob/main").replace(" ", "%20").replace("\\", "/") query_link = "[Click to see the query in the CodeQL repository](https://github.com/" + \ transform_link + ")\n"