Skip to main content
GitHub list repositories for a user action lists public repositories owned by a specific GitHub user. This is a read-only action that returns repository metadata with support for filtering, sorting, 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.
  • The GitHub app must have read permissions to repository metadata.

Supported parameters

ParameterTypeRequiredDescription
UsernameStringYesThe GitHub username whose repositories you want to list.
Repository typeStringNoFilter by repository type (e.g., “all”, “owner”, “member”).
Sort byStringNoField to sort repositories by (e.g., “created”, “updated”, “pushed”, “full_name”).
DirectionStringNoSort direction (“asc” for ascending, “desc” for descending). Works with the sort parameter.
Results per pageIntegerNoMaximum number of repositories to return per page (default is 30, maximum is 100).
PageIntegerNoPage 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

  • 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 read permissions to repository metadata.
  • 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 read permissions to repository metadata. If using a custom app, verify that the metadata:read permission is enabled.
  • 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.
  • 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.
  • 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

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”).
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.
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.
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.