List Repositories
Repositories
List Repositories
Retrieve all GitHub repositories accessible to the authenticated user with connection status
GET
List Repositories
Overview
This endpoint fetches all GitHub repositories the user has access to and annotates them with their connection status to Nectr AI. The response includes repositories where the user is an owner, collaborator, or organization member.Authentication
Requires a valid JWT token in theAuthorization header.
Request
Response
Returns an array of repository objects with connection metadata.array
Array of repository objects
integer
GitHub repository ID
string
Repository name (without owner)
string
Full repository name in
owner/repo formatstring | null
Repository description from GitHub
boolean
Whether the repository is private
string
GitHub URL to the repository
string
ISO 8601 timestamp of last repository update
boolean
Whether this repository is connected to Nectr AI
integer | null
Database ID of the installation record if connected, otherwise
nullExample Response
Error Responses
JWT token is invalid, expired, or missing
GitHub OAuth token cannot be decrypted (SECRET_KEY changed)
Failed to fetch repositories from GitHub API
Implementation Details
GitHub API Pagination
The endpoint automatically handles GitHub API pagination, fetching up to 100 repositories per page until all accessible repositories are retrieved.Repository Filtering
Repositories are fetched with the following GitHub API parameters:affiliation:owner,collaborator,organization_membersort:updated(most recently updated first)per_page:100
Connection Status
Theis_connected field is determined by checking for an active Installation record in the database where:
user_idmatches the current userrepo_full_namematches the repositoryis_activeistrue