Skip to content

Commit 1073a28

Browse files
authored
Merge pull request github#13424 from github/si-10647-docs-update
Multi-variant repository analysis docs update
2 parents a5410bd + 2e2a03d commit 1073a28

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,36 @@ For example, if you want to continue analyzing a set of repositories that had re
153153
154154
You can then insert the ``new-repo-list`` of repositories into your list of custom repository lists for easy access in the Variant Analysis Repositories panel.
155155

156+
Using GitHub code search to add repositories to a custom list
157+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158+
159+
You can use code search directly in the CodeQL extension to add a subset of repositories from GitHub.com to a custom list.
160+
161+
.. pull-quote::
162+
163+
Note
164+
165+
This feature uses the legacy code search via the code search API. For more information on the syntax to use, see "`Searching code (legacy) <https://docs.github.com/en/search-github/searching-on-github/searching-code>`__."
166+
167+
For example, to add all repositories in the ``rails`` organization on GitHub, you can search ``org:rails``.
168+
169+
You can add a maximum of 1000 repositories to a custom list per search.
170+
171+
#. In the Variant Analysis Repositories panel, choose the list that you want to add repositories to. You can create a new list or choose an existing list that already contains repositories.
172+
173+
#. Right-click on the list you have chosen and then click **Add repositories with GitHub Code Search**.
174+
175+
#. In the pop-up that appears at the top of the application, under the search bar, select a language for your search from the choices in the dropdown.
176+
177+
.. image:: ../images/codeql-for-visual-studio-code/variant-analysis-code-search-language.png
178+
:alt: Screenshot of the search bar for using code search to add repositories to a custom list. The search bar asks you to choose a language for your search and has a dropdown list of languages to choose from.
179+
180+
#. In the search bar, type the search query that you want to use and press **Enter**.
181+
182+
You can view the progress of your search in the bottom right corner of the application in a box with the text "Searching for repositories...". If you click **Cancel**, no repositories will be added to your list. Once complete, you will see the resulting repositories appear in the dropdown under your custom list in the Variant Analysis Repositories panel.
183+
184+
Some of the resulting repositories will not have CodeQL databases and some may not allow access by the CodeQL extension for Visual Studio Code. When you run an analysis on the list, the Variant Analysis Results view will show you which repositories were analyzed, which denied access, and which had no CodeQL database.
185+
156186
Troubleshooting variant analysis
157187
--------------------------------
158188

28.2 KB
Loading

0 commit comments

Comments
 (0)