-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[docs] Add new process to generate query help for help site #4550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d41dd2d
to
15fb257
Compare
When I ran this workflow with just the "code-scanning" and "security-extended" query suites it took about 12 minutes. I added "security-and-quality" in 74d274c and now it takes 32 minutes 🤦 |
74d274c
to
8aebe7e
Compare
@sj, @esbena: the markdown files generated by the script now have filenames based on the |
Thanks. I think using |
911a41b
to
6dbe5b6
Compare
6dbe5b6
to
f5ae008
Compare
Ok, done 👍 For each query help page, I've also added a line at the bottom of the query metadata section that notes which code scanning query suite the query appears in. |
We are nearing the end of the content work for the new docs site, so I'd love to move this along if possible. It's not super important to get the processes merged, but the output does need to be finalized before we use it on the new site. With that in mind I'd like to pull in a review from @sj to make sure that we are on track from a product point of view please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, this looks great @jf205! 🎉 I've added a couple of minor (mostly optional) suggestions and questions.
I haven't looked too closely at the script/workflow, but let me know if there's anything specific you'd like me to test or review!
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Thanks for the docs review @shati-patel. Following your comments I've:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tweaks! All LGTM from a docs point of view, but I'll let someone more qualified take a look at the scripts 👀
Thanks! I'll do a proper review this week. I think some of the functionality you've written should eventually make its way into |
👍🏻 thanks @adityasharad Merging this now 🎉 |
Quick follow-up PR: #4770 |
This PR adds a process for generating query help documentation to use in on the CodeQL docs site so that we can move away from the Wiki.
For this new process I've added:
a Python script that renders the query help as markdown. It does the following:
codeql generate query-help
for the queries in a selected query suite for all the languages we currently support to produce a markdown file for each query help articletoc-<lang>.rst
files which list the query help files for each language. These toc files are part the Sphinx project to render the query help as HTML.files needed to add a new Sphinx project. This includes:
conf.py
files used in our other Sphinx docs, but it specifies recommonmark as an extension to build HTML from markdown.includes
to insert the TOCs generated by the docs generation script.an actions workflow file which:
You can see a preview of the HTML output here.