Sync GitHub contributions to other codebases and mark them private - #129
Draft
Aias wants to merge 1 commit into
Draft
Sync GitHub contributions to other codebases and mark them private#129Aias wants to merge 1 commit into
Aias wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anauthor:@me org:<org>scope for eachGITHUB_COMMIT_SEARCH_ORGSentry and anauthor-emailmatch for eachGITHUB_COMMIT_AUTHOR_EMAILSentry. 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.tsis 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-runfor batched runs, and marks pre-existing non-owned repo records private. Delete it once history is backfilled.