Skip to content

Sync GitHub contributions to other codebases and mark them private - #129

Draft
Aias wants to merge 1 commit into
mainfrom
github-contributions-other-repos
Draft

Sync GitHub contributions to other codebases and mark them private#129
Aias wants to merge 1 commit into
mainfrom
github-contributions-other-repos

Conversation

@Aias

@Aias Aias commented Jun 27, 2026

Copy link
Copy Markdown
Owner

The commit sync only matched author:@me — the gmail-linked account — so contributions authored under other identities, and contributions to private org repos you don't own, never reached the knowledge base.

Commit search now runs once per configured identity: author:@me, plus an author:@me org:<org> scope for each GITHUB_COMMIT_SEARCH_ORGS entry and an author-email match for each GITHUB_COMMIT_AUTHOR_EMAILS entry. Private org repos surface in search but can't be read via REST under an unapproved fine-grained token, so when the repo fetch returns 403/404 the commit is recorded from its search metadata rather than skipped (without per-file changes or line stats).

Repository records default to private when the owner isn't you, marking contributions to repos you don't own — and the repos themselves — private by default. Owned, user-curated records are left alone.

scripts/backfill-github-commits.ts is a temporary, date-windowed backfill that reaches history past the live sync's forward-only cutoff and GitHub's 1000-result search cap. It reuses the live per-commit upsert, so it's idempotent and resumable, takes --from/--to/--window-days/--query/--summaries/--dry-run for batched runs, and marks pre-existing non-owned repo records private. Delete it once history is backfilled.

The commit sync only matched author:@me — your gmail-linked account — so
contributions authored under other identities, and to private org repos you
don't own, never made it into the knowledge base.

Commit search now runs per configured identity: author:@me plus an
author:@me org:<org> scope for each GITHUB_COMMIT_SEARCH_ORGS entry and an
author-email match for each GITHUB_COMMIT_AUTHOR_EMAILS entry. Private org
repos surface in search but can't be read via REST, so when the repo fetch
returns 403/404 the commit is recorded from its search metadata instead of
being skipped (without per-file changes).

Repository records now default to private when the owner isn't you, so
contributions to repos you don't own are private by default. A temporary,
date-windowed backfill script walks the full history past the live sync's
forward cutoff and GitHub's 1000-result search cap; it is idempotent and
resumable, and marks existing non-owned repo records private.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant