feat(conduit): capture GitHub commits + PRs (remote work the git source can't see) - #1651
Open
elhoim wants to merge 7 commits into
Open
feat(conduit): capture GitHub commits + PRs (remote work the git source can't see)#1651elhoim wants to merge 7 commits into
elhoim wants to merge 7 commits into
Conversation
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.
Problem
Conduit's
gitsource only sees commits in a localgit log. A lot of real work never lands there:ghor the webNone of it shows up in the daily record or in the hourly BuildInsight read, so someone who spent the day shipping pull requests sees an empty or misleading Conduit. (Concretely: a day of 28 PRs rendered as "no activity" because not one was a local commit.)
Fix — a
githubsourceA new adapter (
Conduit/adapters/github.ts) captures your own commit + PR activity straight from GitHub's per-user event feed (/users/{login}/events), so remote/API work is reflected too.ghCLI — no tokens handled in-tree.ghalready honorsGH_CONFIG_DIR.sources.github = false), so existing installs are unaffected until enabled.githubUser(elsegh api user),githubConfigDir(for a service account whose GitHub auth lives under a different OS user),githubCliPath(elseghfromPATH).Commits reuse the existing
git-commitevent type (so they count and de-dupe against local commits); PRs use a newgithub-prtype.BuildInsight.summarize()now folds PRs into the read, and the PR's head branch name is used as the label (the per-user feed ships a minimalpull_requestwith no title, but the branch name is present and just as descriptive — no extra API call per PR).Files
Conduit/adapters/github.ts— new adapterConduit/config.ts—githubsource +githubUser/githubConfigDir/githubCliPath(all optional, coerced/validated)Conduit/types.ts—github-prevent typeConduit/conduit.ts— register the source in the capture loopConduit/sources.ts— source descriptor for the /conduit "Sources & cadence" panelConduit/BuildInsight.ts— count PRs and include branch labels in the readObservability/src/app/conduit/page.tsx— GitHub icon for the new sourceVerified (headless Linux)
Enabled the source and ran a capture over the day's activity:
#1650 opened → fix/conduit-linux-cron-scheduling, …) — activity that was completely invisible before.sources.githubunset, capture behaves exactly as before (adapter is a no-op).