List Repositories
Retrieves all repositories accessible to the GitHub App installation. This action provides comprehensive repository information including metadata, permissions, and configuration details.
Overview
- Purpose: Get a complete list of all repositories that the GitHub App has access to within the installed organization or user account.
- Use Cases: Repository discovery, building repository selectors, auditing accessible repositories, syncing repository metadata, validating permissions.
- API Method: GET /repositories
- GitHub API: Uses GitHub’s
/installation/repositoriesendpoint with automatic pagination.
Input Fields
No Input Required: This action does not require any input parameters. It automatically retrieves all accessible repositories for the authenticated GitHub App installation.
Output - Repository Array
Returns an object containing an array of repository objects. Each repository includes comprehensive metadata and configuration details.
Repository Core Information
- ID: Unique numeric identifier for the repository.
- Name: Repository name (without owner prefix).
- Full Name: Complete repository identifier in ‘owner/repo’ format.
- Description: Repository description text (can be null).
- Owner: Object containing owner/organization information (login, avatar, URLs, etc.).
- Private: Boolean indicating if the repository is private or public.
- Fork: Boolean indicating if this repository is a fork of another repository.
- Archived: Boolean indicating if the repository has been archived.
- Disabled: Boolean indicating if the repository has been disabled.
Repository URLs and Endpoints
- HTML URL: Web URL to view the repository on GitHub.
- Clone URL: HTTPS URL for cloning the repository.
- SSH URL: SSH URL for cloning the repository.
- Git URL: Git protocol URL for the repository.
- SVN URL: Subversion URL (for SVN compatibility).
- Homepage: Repository homepage URL (can be null).
- API URLs: Various API endpoints for issues, pulls, commits, branches, etc.
Repository Statistics
- Size: Repository size in kilobytes.
- Stargazers Count: Number of users who have starred the repository.
- Watchers Count: Number of users watching the repository.
- Forks Count: Number of times the repository has been forked.
- Open Issues Count: Number of currently open issues.
- Open Issues: Total open issues (includes pull requests in some contexts).
Repository Configuration
- Default Branch: Name of the default branch (usually ‘main’ or ‘master’).
- Language: Primary programming language (can be null).
- Topics: Array of topic tags associated with the repository.
- Visibility: Repository visibility setting (‘public’, ‘private’, or ‘internal’).
- License: License information object (key, name, SPDX ID, URL) or null.
- Is Template: Boolean indicating if this is a template repository.
- Allow Forking: Boolean indicating if forking is allowed.
Repository Features
- Has Issues: Boolean indicating if issues are enabled.
- Has Projects: Boolean indicating if projects are enabled.
- Has Wiki: Boolean indicating if wiki is enabled.
- Has Pages: Boolean indicating if GitHub Pages is enabled.
- Has Downloads: Boolean indicating if downloads are enabled.
- Has Discussions: Boolean indicating if discussions are enabled.
- Web Commit Signoff Required: Boolean indicating if commit signoff is required.
Permissions
- Admin: Boolean indicating if the app has admin permissions.
- Maintain: Boolean indicating if the app has maintain permissions.
- Push: Boolean indicating if the app can push to the repository.
- Pull: Boolean indicating if the app can pull from the repository.
- Triage: Boolean indicating if the app has triage permissions.
Owner Information
- Login: Username or organization name of the repository owner.
- ID: Unique identifier for the owner.
- Avatar URL: URL to the owner’s avatar image.
- HTML URL: Web URL to the owner’s profile.
- Type: Owner type (‘User’ or ‘Organization’).
- Site Admin: Boolean indicating if the owner is a GitHub site administrator.
- API URLs: Various API endpoints for the owner’s resources.
Timestamps
- Created At: ISO 8601 timestamp when the repository was created.
- Updated At: ISO 8601 timestamp of the last repository update.
- Pushed At: ISO 8601 timestamp of the last push to the repository.
Pagination
- Automatic Pagination: The action automatically handles pagination, retrieving all repositories across multiple pages.
- Page Size: Fetches up to 100 repositories per page.
- Complete Results: Returns all accessible repositories in a single response array.
Tips
[!TIP] Use the ‘full_name’ field for unique repository identification across GitHub
[!TIP] Check ‘permissions’ object to verify what operations the app can perform
[!TIP] Filter by ‘private’ field to separate public and private repositories
[!TIP] Use ‘default_branch’ to know which branch to target for operations
[!WARNING] Check ‘archived’ status before attempting write operations
[!TIP] Store repository IDs for efficient lookups and API operations
[!TIP] Use ‘clone_url’ or ‘ssh_url’ for repository cloning operations
[!TIP] Check ‘has_issues’, ‘has_projects’, etc. to determine available features
[!TIP] Use ‘topics’ array for categorizing and filtering repositories
[!TIP] Monitor ‘pushed_at’ timestamp to detect repository activity
[!TIP] The action automatically paginates - no need to handle pagination manually
[!TIP] Cache repository lists to reduce API calls and improve performance