Skip to main content
GitHub search repositories action searches GitHub repositories that match a query string. This is a read-only action that returns repository metadata with support for sorting, filtering, and pagination.

Prerequisites

  • Your admin must install and configure the GitHub connector, add the GitHub actions pack under Admin > Actions, and enable this action.
  • A GitHub app must be installed on the relevant organization(s) and linked to the correct GitHub datasource in the Glean admin console.

Supported parameters

ParameterTypeDescription
Search queryStringText or structured query to find matching repositories (e.g., language:python, org:facebook, topic:react).
Sort byStringField to sort results by (e.g., stars, forks, updated).
OrderStringResult order: asc (ascending) or desc (descending).
PageIntegerPage number of results to return for pagination.
Results per pageIntegerNumber of results to return per page (maximum 100).

Usage examples

  • “Find the most popular Python repositories on GitHub”.
  • “Show me React repositories from Facebook”.
  • “Find recently updated TypeScript projects with more than 100 stars”.

Troubleshooting

  • Possible cause: The GitHub connector is not fully set up, the GitHub app is not installed on the target organization, or the app is missing required permissions.
  • Fix: Confirm that the GitHub connector is installed and authenticated, that the GitHub app is installed on the correct organization(s), and that it has the necessary repository scopes. If using a custom app, verify that permissions to search repositories are enabled.
  • Possible cause: The search query may have invalid syntax, the qualifiers may not match any repositories, or the authenticated user may not have access to matching repositories.
  • Fix: Verify the search query syntax using GitHub’s search qualifiers documentation. Try simplifying the query (e.g., start with just language:python) to confirm the connection works. Note that private repositories are only returned if the authenticated user has access to them.
  • Possible cause: Some combinations of search qualifiers may not work as expected due to limitations in the GitHub Search API.
  • Fix: Try simplifying the query by using fewer qualifiers. For example, if repo:owner/name language:python returns no results, try just repo:owner/name first to confirm the basic query works.
  • Possible cause: GitHub imposes rate limits on search API calls, which can be reached with frequent searches.
  • Fix: Reduce the frequency of search queries or implement caching for common searches. GitHub’s rate limits for search are typically lower than other API endpoints. Contact your admin to review the GitHub app’s rate limit status.

FAQs

The action supports GitHub’s repository search qualifiers including: language:, org:, user:, topic:, stars:, forks:, created:, pushed:, size:, license:, is:public/private, and text search. You can combine multiple qualifiers with spaces. For example: language:python stars:>1000 topic:machine-learning.
The action can return up to 100 repositories per page using the Results per page parameter. For larger result sets, use the Page parameter to paginate through results. GitHub’s search API typically returns up to 1000 total results per query.
Yes, the action will return private repositories that the authenticated user has access to. The results depend on the permissions of the connected GitHub account and the repositories they can access.
You can sort by: stars (star count), forks (fork count), help-wanted-issues, updated (last update date), or leave empty for relevance-based sorting. Use the Order parameter to specify ascending (asc) or descending (desc) order.
This action searches across all of GitHub (or within the authenticated user’s accessible repositories) using query qualifiers. To list repositories for a specific organization or user without search filtering, use other repository listing actions instead.