feat(github): events, contributions (multi-year), authored history + profile pinned/orgs/achievements#75
Open
volod-vana wants to merge 3 commits into
Open
feat(github): events, contributions (multi-year), authored history + profile pinned/orgs/achievements#75volod-vana wants to merge 3 commits into
volod-vana wants to merge 3 commits into
Conversation
…evements
Adds two new scopes to the GitHub connector and extends profile.
github.events
- GET api.github.com/users/{u}/events/public (anonymous, 60/hr — fine
for daily sync)
- Normalizes 12 event types (PushEvent, PullRequestEvent,
PullRequestReviewEvent, PullRequestReviewCommentEvent, IssuesEvent,
IssueCommentEvent, CreateEvent, DeleteEvent, ForkEvent, WatchEvent,
ReleaseEvent, GollumEvent, CommitCommentEvent) to a uniform shape
{id, type, createdAt, repo, action, title, body, url, branch, commits}.
- Up to 300 events / ~90 days (GitHub events API ceiling).
- Crucially: includes activity in organization-owned repos that
github.repositories cannot see (it only scrapes ?tab=repositories,
which lists owned + forks).
github.contributions
- Scrapes the contribution-graph cells from /{u} (both old "rect.day"
and new "td.ContributionCalendar-day" markups).
- Returns: days[{date, count, level}], monthlyTotals[], topDay,
totalContributionsLastYear.
github.profile (extended)
- pinnedRepositories — what the user curates on their profile
- organizations — visible org-avatar group
- achievements — badge names + icon URLs
- contributionsLastYear — quick-glance counter from the profile heading
github.history (NEW)
- Up to 1000 authored PRs + 1000 authored issues via Search API
- Full lifetime (not limited to the 90-day events window)
- Includes any repo the user has touched: org-owned, forks, anything
- Anonymous Search API (no token / no flow changes), 6.5s gap
between pages to stay under the 10 req/min rate limit
- Each item carries title, body, dates, repo, labels, state, url
github.contributions (extended)
- Now scrapes 4 calendar years (current + 3 prior) instead of the
rolling 12-month window
- New yearTotals[] field aggregates per-year contribution counts
- De-dupes overlapping days across year windows
- First-year scrape miss is fatal; later-year misses tolerable
Bumps connector version to 1.4.0.
Schema Health Check — Non-blocking inherited issues44/50 scopes consistent | 6 inherited Gateway gap(s) | no new blocking issues in this PR |
- registry.json: bump github-playwright 1.2.0 → 1.4.0, refresh script and metadata sha256s, update description - connectors/github/github-playwright.js: sync VERSION const to 1.4.0 - artifacts/github-playwright/github-playwright-1.4.0.tgz: new bundle - connector-index.json: append 1.4.0 entry, refresh sourceTag / sourceCommit / artifactUrl on all entries to match this branch's HEAD (standard regen side-effect) The 16 other byte-different artifacts are gtar-version artifacts from running scripts/generate-connector-index.mjs on macOS (BSD tar lacks --sort=name; we use gtar via PATH shim). Functionally identical to main's artifacts — same bundle contents, different gzip framing.
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.
Summary
Extends the GitHub connector from 3 scopes → 6 scopes to surface a Personal Server with an actually-useful slice of the user's GitHub history. Same auth flow (Playwright session login) — no new credential prompts, no PAT.
The motivating gap: `github.repositories` only sees a user's owned repos (5 for the test account). For most engineers — including ours — daily activity happens in org-owned repos, which were entirely invisible to PS. After this PR, a typical Vana team member's PS holds ~3 years of authored PRs across all orgs, plus a full per-year contribution graph.
Scopes added
Scope extended
Connector version
`1.2.0` → `1.4.0` (additive only — existing scope shapes unchanged).
Validations run locally
`generate-connector-index.mjs --check` fails locally on macOS (BSD tar missing `--sort=name`); should pass on Ubuntu CI.
Schema registration (dev gateway)
All three new scopes already registered on `dev.data-gateway.vana.org` against the project's builder key:
Their current `definitionUrl` points at temporary gists. Post-merge action: re-register with canonical URLs at `raw.githubusercontent.com/vana-com/data-connectors/main/connectors/github/schemas/{scope}.json`. I can do this in a follow-up — schemaId changes because URL is part of the EIP-712 payload, so we'll need to coordinate with anyone already pointing at the old ids.
Real-world impact (test account `@volod-vana`)
Test plan