Skip to content

Add GitHub as a Composio memory provider (joining gmail / notion / slack / clickup / linear) #62

Closed

Description

@ElioNeto

Original issue tinyhumansai#2408 by @justinhsu1477 on 2026-05-21T04:03:32Z


Summary

Add GitHubProvider under src/openhuman/composio/providers/github/, lifting the existing catalog-only GitHub module into a full native memory-ingest provider. Until now github/mod.rs declares itself "curated tool catalog only — no native ComposioProvider implementation yet"; this change closes that gap so the connected user's GitHub issues stream into the Memory Tree on the periodic scheduler.

Problem

composio/providers/ already has memory-ingest providers for gmail, notion, slack, clickup, and (pending merge of tinyhumansai#2402) linear. github/ is in the same providers/ folder but is structurally one level lower — only tools.rs is populated; there's no ComposioProvider impl, no entry in init_default_providers, no has_native_provider match.

For an open-source AI assistant whose own contributors live on GitHub, this is the most obviously high-leverage missing provider: every maintainer / reviewer / external contributor can dogfood it within minutes of merge.

Solution

Promote composio/providers/github/ to a full provider by adding the three companion files that already exist for gmail / notion / clickup / linear:

src/openhuman/composio/providers/github/
  mod.rs        — UPDATED to declare provider/sync/tests modules + re-export
  tools.rs      — KEEPS existing GITHUB_CURATED (no changes needed —
                  GITHUB_GET_AUTHENTICATED_USER and GITHUB_SEARCH_ISSUES
                  are already curated, which is the minimum the sync path needs)
  provider.rs   — NEW: impl ComposioProvider for GitHubProvider
  sync.rs       — NEW: payload-shape helpers (extract_issues,
                  extract_issue_title, extract_issue_updated,
                  extract_repo_qualified_identifier, extract_viewer_login)
  tests.rs      — NEW: unit tests

Plus the standard registration touchpoints (same six places ClickUp landed in tinyhumansai#2291 and Linear in tinyhumansai#2402):

  1. composio/providers/mod.rs: has_native_provider matches "github" (already in CAPABILITY_TOOLKITS).
  2. composio/providers/mod.rs::native_provider_sync_interval: add "github" => ... arm.
  3. composio/providers/mod.rs::catalog_for_toolkit: stays — already points to github::GITHUB_CURATED.
  4. composio/providers/registry.rs::init_default_providers: register_provider(Arc::new(GitHubProvider::new())).
  5. composio/providers/descriptions.rs: update GitHub description to mention Memory Tree sync (matches the clickup / linear shape).
  6. github/mod.rs docstring: remove the "no native impl yet" disclaimer.

Sync model (mirroring Linear)

  1. SyncState::load("github", connection_id) from the shared KV store.
  2. Daily request budget check.
  3. Resolve viewer login via GITHUB_GET_AUTHENTICATED_USER — needed for the assignee:<login> search filter.
  4. Re-check budget between viewer probe and search call (same discipline ClickUp/Linear got after CodeRabbit feedback).
  5. Page through GITHUB_SEARCH_ISSUES with query assignee:<viewer_login> sort:updated-desc. GitHub's search API caps at 1000 results, so pagination is naturally bounded.
  6. Per issue, persist as one memory document via persist_single_item. Dedupe by composite issue_id@updated_at.
  7. Advance cursor to newest updated_at seen, save state.

Source-id convention

composio-github-issue-<global_id> — GitHub's id (integer) is globally unique across all of GitHub, so it's a stable key. The document title uses the human-readable form GitHub <owner>/<repo>#<number>: <title> (e.g. GitHub tinyhumansai/openhuman#2400: Add Linear...) so search hits surface the way contributors refer to issues in conversation.

Privacy posture

Same "fetch-what-the-user-sees" stance as gmail / notion / clickup / linear: only issues where the connected user is the assignee are pulled, never the whole watched-repos' issue graphs. The assignee:<viewer_login> qualifier is constructed inside the provider, never accepted from a caller, so the boundary can't be tunnelled around.

Acceptance criteria

  • GitHubProvider registered in init_default_providers alongside gmail / notion / slack / clickup / linear.
  • First sync() after on_connection_created() ingests one page of GitHub issues into the Memory Tree as Document chunks with source-id composio-github-issue-<…>.
  • Incremental sync respects the updated_at cursor.
  • Daily request budget check fires.
  • Assignee-scoped fetch — no issue is pulled unless viewer_login is in assignees.
  • Unit tests cover cursor advancement, dedup, canonicalize, viewer extraction.
  • Diff coverage ≥ 80% — changed-lines coverage gate.
  • github/mod.rs docstring updated to reflect new native-provider status.

Out of scope (follow-ups)

  • PR ingest (pulls/) — issues only for v1; PR-as-memory-doc is a separate, larger surface decision.
  • Comments-as-separate-docs — v1 folds key issue context into the issue document via GITHUB_LIST_ISSUE_COMMENTS if pulled, but doesn't create one chunk per comment.
  • Notifications inbox (notifications/) — different sync model, separate provider follow-up.
  • Repo / Releases / Discussions ingest — out of scope for v1.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions