MemorySync
Integrations

GitHub integration

Bring permitted engineering knowledge into MemorySync for retrieval alongside your application memories. Retrieve repository, issue, pull-request, and commit context from repositories you grant access to.

What engineering context becomes retrievable

Retrieve repository, issue, pull-request, and commit context from repositories you grant access to.

Repositories

Repository-related engineering content within granted permissions.

Issues and pull requests

Issue and pull-request content visible in authorized repositories.

Recent commits

Recent commit messages and change context from granted repositories.

Choose repository scope

Authorizing account
Granted repositories
Supported engineering context
Outside this path: repositories the account cannot access or that are not in the granted set
Repository boundary
The connector can only ingest supported content visible through the repository permissions you grant.

Guided first connection checklist

  • A GitHub account with access to the repositories you intend to share.
  • Permission to grant repository access under your organization’s policy.
  • A MemorySync project for the imported engineering knowledge.
Local planning guide
Plan your GitHub import

Check items for your own planning. Nothing here changes a live connection.

0 of 4 planning steps complete

Initial and incremental ingestion

  1. 1
    Grant repository access

    Authorize only the repositories needed for the use case.

  2. 2
    Import engineering context

    Supported content enters the ingestion workflow.

  3. 3
    Apply incremental changes

    Later ingestion processes changed supported content incrementally.

  4. 4
    Retrieve

    Query the imported knowledge with other project memories.

Verify with a real engineering question

Query for a known issue, pull request, or commit from a repository in the granted set. Confirm the result belongs to the intended project and repository boundary before expanding access.

Common repository issues

Why is a repository missing?

Confirm the authorizing account can access it and that the repository was included in the granted set.

Why is an issue or pull request missing?

Verify that it belongs to an authorized repository and is visible to the connected account.

What should I do after repository access changes?

Review the granted repository set, then verify retrieval with a known item from the intended repositories.

Operations on this page

OperationMethod and pathPythonNode.js
Read GitHub capabilitiesGET /api/v2/integrations/providers/githubproviders.getproviders.get
Start GitHub OAuthPOST /api/v2/integrations/oauth/initiateconnections.oauth.initiateconnections.oauth.initiate
Confirm the connectionGET /api/v2/integrations/connections/{connection_id}connections.getconnections.get
Start synchronizationPOST /api/v2/integrations/connections/{connection_id}/syncconnections.trigger_syncconnections.triggerSync

Authentication and scope

RequirementContract
CredentialAn API key sent as X-API-Key. Connector operations are not end-user scoped.
Read scopeintegrations:read for every GET.
Write scopeintegrations:write for every POST, PUT, PATCH and DELETE.
TenantDerived from the authenticated key. There is no tenant parameter to pass or to get wrong.
X-End-User-IDNot used. A connection belongs to the organization, not to one end user.

1. Check GitHub availability

Read the provider record before showing a connect button. It reports whether GitHub is available and the object and sync capabilities enabled by this deployment.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
provider = client.providers.get("github")
print(provider["is_available"], provider["capabilities"])
GET/api/v2/integrations/providers/{provider_id}
200 OK

2. Authorize GitHub

Start OAuth on your server, then redirect the browser to authorization_url. Keep connection_id so you can verify the result after consent.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
result = client.connections.oauth.initiate(
"github",
redirect_url="https://app.example.com/connections/callback",
)
print(result["authorization_url"], result["connection_id"])
POST/api/v2/integrations/oauth/initiate
200 OK

3. Confirm and sync

Confirm status is connected before queuing the first incremental sync.

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
)
connection = client.connections.get("conn_8f21a4")
if connection["status"] == "connected":
job = client.connections.trigger_sync("conn_8f21a4", job_type="incremental")
print(job["id"], job["status"])
Read one connection
GET/api/v2/integrations/connections/{connection_id}
200 OK
Start a sync
POST/api/v2/integrations/connections/{connection_id}/sync
202 Accepted

Errors and next action

StatusMeaningNext action
401Missing, malformed or inactive API key.Check server configuration without printing the key.
403The key lacks integrations:read or integrations:write.Grant the scope on the key, or use a key that has it.
404The connection, object or job is not visible to this tenant.Confirm the identifier belongs to this organization.
409The connection is in a state that forbids the operation.Read the connection status first and act on it.
429Rate limited, either by MemorySync or by the upstream provider.Back off; do not tighten a polling loop in response.
5xxService failure.Treat a write outcome as uncertain and reconcile by reading the connection back.
Was this page helpful?