Add license qualifier section to code search syntax#43285
Add license qualifier section to code search syntax#43285PreciselyAlyss wants to merge 1 commit intogithub:mainfrom
Conversation
Added a new section on the license qualifier for filtering repositories based on their license type.
|
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Pull request overview
Adds documentation for using a license qualifier in the GitHub Code Search syntax reference, helping users filter results by repository license.
Changes:
- Added a new “License qualifier” section with an example query (
license:MIT). - Updated the qualifiers list to include a link to the new section.
| license:MIT | ||
| ``` | ||
|
|
||
| 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. |
There was a problem hiding this comment.
This uses an absolute docs URL and hardcoded link text. For internal docs links, use a relative path and the [AUTOTITLE](/...) placeholder (including the #searching-github-by-license-type anchor) so titles stay in sync and links work across versions/environments.
| 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. | |
| 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. |
|
|
||
| ### License qualifier | ||
|
|
||
| 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`. |
There was a problem hiding this comment.
For consistency with the other qualifier sections in this article (for example, language: and path:), consider referring to this as the license: qualifier (with the colon) in the descriptive sentence as well.
| 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`. | |
| 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`. |
Added a new section on the license qualifier for filtering repositories based on their license type.
Why:
Better consolidation of search qualifiers into a (more) common documentation page for a better user experience when learning about applying code search for repositories across GitHub.
Closes: #43284
What's being changed (if available, include any code snippets, screenshots, or gifs):
Addition of a brief section with a pointer to the licensing a repository article about how to use license qualifiers for code search on GitHub.
Check off the following: