Skip to content

Commit f9a1ff7

Browse files
Add license qualifier section to code search syntax
Added a new section on the license qualifier for filtering repositories based on their license type.
1 parent c5a427c commit f9a1ff7

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+
You can filter repositories based on their license or license family using the `license` qualifier and the exact license keyword, e.g. `Apache-2.0`, `CC`, `MIT`.
166+
167+
```text
168+
license:MIT
169+
```
170+
171+
See [Licensing a Repository](https://docs.github.com/en/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)