Skip to content

docs: add query docs for github #467

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

Merged
merged 17 commits into from
Jun 16, 2025
Merged

docs: add query docs for github #467

merged 17 commits into from
Jun 16, 2025

Conversation

sympatheticmoose
Copy link
Contributor

@sympatheticmoose sympatheticmoose commented May 15, 2025

This PR adds detailed documentation for the query types supported by the github data source

It introduces a summary table of all available types as well as details on:

  • query parameters
  • sample queries
  • response data

TODO:

Notes for reviewers:

  • Packages response is best effort based on packages.go - I was unable to query this successfully
  • Unsure on the value column for vulnerabilities, again took a guess.

Potential follow ups:

  • Add screenshots for sample responses
  • We could optionally extend this to cover specific permission requirements on query
  • Similarly I wonder if we should indicate whether a query respects datetime picker in some form or not
  • I got a little lazy with table formatting, this could be improved, but never sure on best approach when column values are on the lengthy side

@sympatheticmoose sympatheticmoose requested a review from a team as a code owner May 15, 2025 10:23
@sympatheticmoose sympatheticmoose changed the title docs: le vibe WIP docs: le vibe May 15, 2025
@yesoreyeram yesoreyeram marked this pull request as draft May 15, 2025 12:23
@sympatheticmoose sympatheticmoose changed the title WIP docs: le vibe WIP docs: add query docs for github May 19, 2025
@sympatheticmoose sympatheticmoose changed the title WIP docs: add query docs for github docs: add query docs for github May 20, 2025
@sympatheticmoose sympatheticmoose marked this pull request as ready for review May 20, 2025 10:28
@sympatheticmoose
Copy link
Contributor Author

@lwandz13 please take a look at this PR in combination with the draft alternative here #466

Beyond content review, we would appreciate your insights on recommended format/layout - i.e. should we have query types in a single page or broken out into individual pages under a query section?

@lwandz13
Copy link

@lwandz13 please take a look at this PR in combination with the draft alternative here #466

Beyond content review, we would appreciate your insights on recommended format/layout - i.e. should we have query types in a single page or broken out into individual pages under a query section?

I'd keep this all on one page. Users can click the link to jump to the section(s) that apply to their use case.

l I'm looking for heading and title guidance in our Writer's Toolkit and don't see any. I'll refer you to Google's style guide (which is what ours is based on) for heading and title guidance. https://developers.google.com/style/headings#markdown

I did a quick review, I'll do a more comprehensive one in the next day or two.

Copy link
Contributor

@itsgareth itsgareth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but maybe you also want to wait for a review from the docs team

@@ -12,7 +12,7 @@ labels:
- oss
- enterprise
- cloud
weight: 200
weight: 300
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to this weight change the following weights should also be updated:
/variables-and-macros > variables.md from 201 to 301,
/variables-and-macros > macros.md from 202 to 302

Copy link
Contributor Author

@sympatheticmoose sympatheticmoose May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird in a way... I thought the weights were relative within a directory? i.e. this will only affect the order from within the variables and macros subfolder.

I can make the change for consistency, but imo these should be 100 and 200 respectively

| updated_at | When the item was last updated: YYYY-MM-DD HH:MM:SS |
| closed_at | When the item was closed, if applicable: YYYY-MM-DD HH:MM:SS |
| (custom fields) | Any custom defined fields will also be returned alongside their values |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we move both notes to the bottom?

Suggested change
{{< admonition type="note" >}}
This query returns a maximum of 200 results.
{{< /admonition >}}
{{< admonition type="note" >}}
GitHub Projects allow for customization of default fields and custom fields to be added,
therefore the response can vary significantly between projects."
{{< /admonition >}}

personally think its looks cleaner/easier to read with this change, WDYT?

Screenshot 2025-05-20 at 16 45 41 Screenshot 2025-05-20 at 16 46 37

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the note on the customization only applies for the response where a project number is specified, whereas the query limit is generic...

How about moving query limit notes consistently higher up - i.e. before query options?

@sympatheticmoose sympatheticmoose moved this to In Progress in OSS Big Tent May 27, 2025
Copy link

@lwandz13 lwandz13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using headings like ##### Sample queries you should skip a line. You can also just use Sample queries instead of using a heading.

https://grafana.com/docs/writers-toolkit/write/markdown-guide/#heading-donts

@sympatheticmoose
Copy link
Contributor Author

@lwandz13 thank you for the review 🙏 I've stuck with h5 purely as it gives the ability to grab a direct link to share

@sympatheticmoose sympatheticmoose added type/docs Improvements or additions to documentation labels Jun 16, 2025
@sympatheticmoose sympatheticmoose merged commit b66c3c6 into main Jun 16, 2025
17 checks passed
@sympatheticmoose sympatheticmoose deleted the moose-ai-docs branch June 16, 2025 14:27
@github-project-automation github-project-automation bot moved this from In Progress to Complete in OSS Big Tent Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Improvements or additions to documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants