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.
- The GitHub app must have read permissions to repository metadata.
Supported parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Username | String | Yes | The GitHub username whose repositories you want to list. |
| Repository type | String | No | Filter by repository type (e.g., “all”, “owner”, “member”). |
| Sort by | String | No | Field to sort repositories by (e.g., “created”, “updated”, “pushed”, “full_name”). |
| Direction | String | No | Sort direction (“asc” for ascending, “desc” for descending). Works with the sort parameter. |
| Results per page | Integer | No | Maximum number of repositories to return per page (default is 30, maximum is 100). |
| Page | Integer | No | Page number for paginated results (default is 1). |
Usage examples
- “Show me the most recently updated repositories owned by the GitHub user ‘octocat’.”
- “List all public repositories for the user ‘torvalds’.”
Troubleshooting
Authentication or authorization failure
Authentication or authorization failure
403 error with OAuth App access restrictions
403 error with OAuth App access restrictions
- Possible cause: The GitHub organization has enabled OAuth App access restrictions, and the app used by this action is not allowed to access repositories for the specified user.
- Fix: Ask your GitHub organization admin to approve or allow the GitHub app used by this action for the relevant repositories, then retry.
User not found or no repositories returned
User not found or no repositories returned
- Possible cause: The username is misspelled, the user does not exist, or the user has no public repositories visible to the authenticated app.
- Fix: Verify the username is correct and that the user has public repositories. Note that this action only returns repositories the authenticated GitHub app can access based on its permissions and the repository visibility settings.
Pagination returns incomplete results
Pagination returns incomplete results
- Possible cause: The user has more repositories than fit in a single page, or the per page parameter is set too low.
- Fix: Use the Page parameter to retrieve additional pages of results. The GitHub API returns up to 100 repositories per page. Check the response metadata to determine if more pages are available.
FAQs
What types of repositories does this action return?
What types of repositories does this action return?
This action returns public repositories owned by the specified GitHub user. The results depend on the repository visibility settings and what the configured GitHub app is allowed to access. Use the Type parameter to filter by repository type (e.g., “owner”, “member”).
Can I list private repositories for a user?
Can I list private repositories for a user?
This action can list private repositories only if the authenticated GitHub app has been granted access to those repositories and the necessary permissions. For most use cases, this action returns public repositories only.
How do I handle pagination when a user has many repositories?
How do I handle pagination when a user has many repositories?
Use the Page and Per page parameters to paginate through results. Set Per page to a value between 1 and 100 (default is 30), and increment Page to retrieve subsequent pages. Check the response metadata to determine if more pages are available.
What is the difference between this action and List repositories for the authenticated user?
What is the difference between this action and List repositories for the authenticated user?
This action lists repositories for any specified GitHub user (by username) and typically returns public repositories. List repositories for the authenticated user lists repositories accessible to the currently authenticated user, including private repositories they own or have access to.