X Tutup
Skip to content

Add license qualifier section to code search syntax#43285

Open
PreciselyAlyss wants to merge 1 commit intogithub:mainfrom
PreciselyAlyss:license-qualifier-search
Open

Add license qualifier section to code search syntax#43285
PreciselyAlyss wants to merge 1 commit intogithub:mainfrom
PreciselyAlyss:license-qualifier-search

Conversation

@PreciselyAlyss
Copy link

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:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Added a new section on the license qualifier for filtering repositories based on their license type.
Copilot AI review requested due to automatic review settings March 9, 2026 23:42
@welcome
Copy link

welcome bot commented Mar 9, 2026

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.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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 links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
search-github/github-code-search/understanding-github-code-search-syntax.md fpt
ghec
fpt
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.

### 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`.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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`.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add license qualifier documentation to code search syntax article

2 participants

X Tutup