Skip to content

Commit 4af7bc8

Browse files
committed
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
1 parent 5db1984 commit 4af7bc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/codeql/query-help-markdown.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ def subprocess_run(cmd):
188188
# Build a link to the query source file for display in the query help
189189
if "go" in prefix_repo_nwo(queryfile):
190190
transform_link = prefix_repo_nwo(queryfile).replace(
191-
"codeql-go", "codeql-go/tree/main").replace(" ", "%20").replace("\\", "/")
191+
"codeql-go", "codeql-go/blob/main").replace(" ", "%20").replace("\\", "/")
192192
else:
193193
transform_link = prefix_repo_nwo(queryfile).replace(
194-
"codeql", "codeql/tree/main").replace(" ", "%20").replace("\\", "/")
194+
"codeql", "codeql/blob/main").replace(" ", "%20").replace("\\", "/")
195195
query_link = "[Click to see the query in the CodeQL repository](https://github.com/" + \
196196
transform_link + ")\n"
197197

0 commit comments

Comments
 (0)