Skip to content

Commit 72de5c7

Browse files
PreciselyAlyssCopilotSharra-writes
authored
Add license qualifier section to code search syntax (#43285)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sharra-writes <sharra-writes@github.com>
1 parent 8116a57 commit 72de5c7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

content/search-github/github-code-search/understanding-github-code-search-syntax.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ You can use specialized keywords to qualify your search.
100100
* [Organization and user qualifiers](#organization-and-user-qualifiers)
101101
* [Enterprise qualifier](#enterprise-qualifier)
102102
* [Language qualifier](#language-qualifier)
103+
* [License qualifier](#license-qualifier)
103104
* [Path qualifier](#path-qualifier)
104105
* [Symbol qualifier](#symbol-qualifier)
105106
* [Content qualifier](#content-qualifier)
@@ -159,6 +160,16 @@ language:ruby OR language:cpp OR language:csharp
159160

160161
For a complete list of supported language names, see [languages.yaml](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml) in [github-linguist/linguist](https://github.com/github-linguist/linguist). If your preferred language is not on the list, you can open a pull request to add it.
161162

163+
### License qualifier
164+
165+
To filter repositories based on their license or license family, use the `license:` qualifier and the exact license keyword, for example `Apache-2.0`, `CC`, `MIT`.
166+
167+
```text
168+
license:MIT
169+
```
170+
171+
See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository#searching-github-by-license-type) for a list of license keywords.
172+
162173
### Path qualifier
163174

164175
To search within file paths, use the `path:` qualifier. This will match files containing the term anywhere in their file path. For example, to find files containing the term `unit_tests` in their path, use:

0 commit comments

Comments
 (0)