Skip to content

feat(source-loader): GitHub Issues loader#39

Open
mroops0111 wants to merge 1 commit into
masterfrom
feat/source-loader-github
Open

feat(source-loader): GitHub Issues loader#39
mroops0111 wants to merge 1 commit into
masterfrom
feat/source-loader-github

Conversation

@mroops0111

Copy link
Copy Markdown
Owner

Closes #28.

Summary

  • New @braidhq/source-loader-github plugin: ingests issues from a GitHub repo via REST, renders each as <destination>/issues/<number>.md with deterministic YAML frontmatter + body + sorted ## Comments.
  • sync keeps a since cursor in .braid-github-cursor.json and uses content-hash-equal writeIfChanged so untouched issues stay byte-identical across syncs (mtime preserved → downstream sha fingerprints don't churn).
  • Pagination via Link: …; rel="next". Pull requests filtered out by default (includePullRequests: false).
  • Token via \${GH_TOKEN} env interpolation; anonymous mode supported but rate-limited.
  • Registered in composeFs only when GH_TOKEN is set — anonymous GitHub gives 60 req/h, which won't survive a realistic sync, so skipping registration surfaces the misconfig at workspace load time rather than mid-batch.

Test plan

  • Unit tests (6 pass): N issues → N files, PR filter, sorted comments, Link pagination, sync cursor + byte-stability, Authorization header from env
  • pnpm typecheck green
  • pnpm lint:fix clean
  • End-to-end dogfood: register braid workspace with kind: 'github' source pointing at this repo; verify sync lands markdown under sources/<id>/issues/ and /braid-extract produces sensible proposals

Closes #28.

New @braidhq/source-loader-github plugin. Pulls issues from a GitHub
repo via REST, renders each as <destination>/issues/<number>.md with
deterministic YAML frontmatter + body + sorted ## Comments. `sync`
keeps a since-cursor in `.braid-github-cursor.json` and only rewrites
files whose content actually changed, so downstream sha fingerprints
don't churn on untouched issues.

Registered in composeFs only when GH_TOKEN is set: anonymous GitHub
gives 60 req/h, which won't survive a realistic sync, so skipping
registration surfaces the misconfig at workspace load time rather than
mid-batch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mroops0111 mroops0111 force-pushed the feat/source-loader-github branch from a6e3696 to 810a3e7 Compare June 15, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add @braidhq/source-loader-github for GitHub issues

1 participant