GitHub

View as Markdown

What it indexes

The GitHub connector indexes content from repositories under one GitHub user or organization. Choose a comma-separated repository list, or select Everything for owner-based enumeration. For an organization owner, Everything can enumerate organization repositories visible to the token. For a user owner, it calls /users/{user}/repos, which enumerates public repositories only. Private repositories under a user owner must be entered explicitly by repository name.

GitHub dataIndexing behavior
Pull requestsEach PR becomes one document whose searchable text is the PR body. Its identifier combines the PR number and title; state, labels, author, assignees, merge state, and several timestamps and counters are metadata. Reviews, comments, diffs, and commit contents are not added to the text.
IssuesEach non-PR issue becomes one document whose searchable text is the issue body. The title and number identify it, and state, labels, author, assignees, and timestamps are metadata. Issue comments are not indexed.
Repository documentsWhen Include Documents is selected, OpenCore reads only the repository’s default branch. It accepts .md, .mdx, .markdown, .rst, and .txt, plus conventional extensionless names such as README, LICENSE, CHANGELOG, and CODEOWNERS. Source-code and data/config extensions are intentionally excluded.
File limitsFiles over 1,000,000 bytes and files below built-in dependency/build path segments are skipped. If GitHub truncates a very large recursive tree, OpenCore indexes the paths it received and reports an incomplete-tree failure.
BranchesThere is no branch field. Document files come only from the current default branch; PRs and issues are repository-wide and are not filtered by branch.

At least one of pull requests, issues, or documents must be selected. The connector does not create a separate searchable document for the repository overview.

Prerequisites

  • Create a dedicated GitHub access token that can read every selected repository and its enabled PR, issue, and contents APIs.
  • Current connector credentials contain one access-token field. They do not contain GitHub App ID, installation ID, client secret, or private-key fields; do not paste an App private key into the token field.
  • For organization repositories protected by SAML SSO, authorize the token for that organization.
  • Record the exact repository owner and, for explicit scope, each repository name without the owner prefix. If the owner is a user, record every required private repository for explicit entry because Everything will not enumerate it.
  • For GitHub Enterprise, have the deployment operator set the deployment-level GITHUB_CONNECTOR_BASE_URL to the instance’s API base URL. When it is unset, the client uses GitHub.com. The Admin form does not set a host per connector.
  • Allow the OpenCore worker to reach the selected GitHub API host and allow user browsers to reach result links on the corresponding web host.
  • If using Auto Sync Permissions, the token must also be able to read repository visibility, collaborators, outside collaborators, teams, organization members, and the email values needed to match GitHub identities to OpenCore users.

Credentials

MethodOpenCore credential valuesAuthentication behavior
GitHub access tokengithub_access_token: <GITHUB_ACCESS_TOKEN>OpenCore passes the token to its GitHub API client. The same token is used for validation, content retrieval, and permission reads when Auto Sync is enabled.

GitHub.com versus GitHub Enterprise is selected by deployment configuration, not by a credential value. The current connector schema has no separate GitHub App credential flow. Token scope names vary by token type and server; validate the actual target repositories and, when applicable, permission endpoints instead of relying only on a nominal scope label.

Configure in OpenCore

  1. In the Admin panel, open Connectors, select GitHub, and create the access-token credential.
  2. Enter one exact GitHub user or organization in Repository Owner.
  3. Select Specific Repository and enter one or more comma-separated repository names, or select Everything for owner-based enumeration. For an organization owner, this requests token-visible organization repositories. For a user owner, it uses /users/{user}/repos and returns public repositories only; enter private user-owned repositories under Specific Repository. Everything is not account-wide: the configured owner remains the boundary.
  4. Select at least one content type: pull requests, issues, or documents. Select documents only when the default-branch documentation-file policy matches the intended content.
  5. Choose document access. Use Auto Sync Permissions only when it is available and its repository-level mapping has been tested. Otherwise use OpenCore Private groups for restricted repositories; use Public only when every OpenCore account may search all selected content.
  6. Set refresh and cleanup options, create the connector, and start indexing.

The first checkpoint invocation resolves the configured repositories, stores their IDs and the first repository, and returns without emitting content. Later invocations advance through PR, issue, and file pages for one repository at a time.

For incremental runs, PRs and issues are ordered by update time. OpenCore moves the poll start three hours earlier and the poll end one day later before filtering them. For files, the adjusted start is compared with repository pushed_at; if the repository is recent enough, the current default-branch document set is enumerated again. A push to any branch can therefore cause default-branch documents to be reprocessed.

Permissions

The access token determines what OpenCore can ingest. When Auto Sync Permissions is available and selected, the current Enterprise implementation applies one repository-level access record to every PR, issue, and file document in that repository:

  • Public repositories map to OpenCore public access.
  • Private repositories map to groups for repository collaborators, outside collaborators, and repository teams.
  • Internal repositories map to an organization-members group.

This is repository-level synchronization, not branch-, issue-, or PR-level authorization. It does not reproduce finer-grained source rules. Group membership is built from GitHub email values; a collaborator, team member, or organization member whose usable email is unavailable can be absent from the synchronized OpenCore group. Test both allowed and denied users before relying on Auto Sync.

Without Auto Sync, GitHub access is not checked when a user searches. Private uses the OpenCore groups assigned to the connector, while Public makes every indexed document searchable to every OpenCore account. A user may be able to search a PR, issue, or file that they cannot open in GitHub if the OpenCore access mode is broader than the source.

Verify

  1. Validate the connector and inspect the actual resolved repository list. For organization Everything, confirm every intended token-visible organization repository is present. For user Everything, expect public repositories only and confirm each required private repository was configured explicitly.
  2. Continue checkpoint invocations until the run completes, then search for one selected PR body, one issue body, and one default-branch README or documentation file for each enabled content type.
  3. Confirm PR comments, reviews, diffs, issue comments, source-code files, oversized documents, and non-default-branch-only documents are absent.
  4. Open result links and confirm they point to the intended GitHub.com or GitHub Enterprise host and, for files, the current default branch.
  5. Make an incremental change to a PR or issue and verify it appears across the connector’s three-hour start overlap. Push a selected document and confirm the default-branch file is updated.
  6. If using Auto Sync, test a public repository and representative private or internal repository users, including a source member whose email is unavailable. If not using Auto Sync, test every assigned OpenCore group and a user outside those groups.

Troubleshooting

SymptomWhat to check
Validation returns 401Replace the invalid or expired GitHub access token.
Validation returns 403Grant the token access to the repository and required APIs. For SAML-protected organizations, confirm the token is authorized for the organization.
Owner or repository returns 404Check the exact owner and repository names, token visibility, and the deployment-level GitHub Enterprise API base URL.
Only some comma-separated repositories indexThe connector logs inaccessible repository names and can continue when at least one configured repository is valid. Check each name and token grant; do not interpret partial success as full scope validation.
Everything omits repositoriesFirst identify the owner type. Organization owners enumerate organization repositories visible to the token, so inspect the actual list and token access. User owners use /users/{user}/repos, which returns public repositories only; add required private user-owned repositories explicitly under Specific Repository.
The first run produces no documentsThe first checkpoint only caches repository IDs. Continue the run so the PR, issue, and file stages can execute.
README indexes but source code does notThis is expected. Include Documents uses the documentation extension/name allowlist and the default branch; it is not a general source-code indexer.
Some documents from a very large repository are missingInspect connector failures for GitHub recursive-tree truncation, the 1,000,000-byte limit, excluded path segments, unsupported extensions, or non-text content.
A recently changed item appears outside the nominal poll windowPR and issue polling uses a three-hour start overlap and a one-day end extension. Repository file processing uses pushed_at, which can change because of a push to any branch.
Auto Sync denies a legitimate source userConfirm the repository visibility mapping, team/collaborator membership, and whether GitHub returns a usable email that matches the OpenCore account. Use an explicit OpenCore Private group if source identity cannot be resolved safely.
Users can search content they cannot open in GitHubAuto Sync is disabled/unavailable or the connector is Public/assigned too broadly. Enable and test Auto Sync when supported, or use narrower OpenCore Private groups and repository scope.