Git Markdown source — type: git + GitSourceStrategy#32
Merged
Conversation
- GitConfig record + optional ContentSource.git field (the extension spec 002 deferred; existing call sites pass null). - GitSourceStrategy (@component, SourceType.GIT, auto-routed by the registry): GitHub Trees API discovery filtered by paths globs (blob SHA = change marker; hard failure throws so the source is isolated, not mass-deleted); raw-content fetch with a server-side bearer token (never logged); YAML frontmatter + Markdown body extraction with Hugo-shortcode cleaning; path -> canonical URL mapping; locale from filename suffix. Produces the same ContentDocument. - application.yaml: example oe-website-markdown git source (disabled; token via GITHUB_TOKEN_OE_WEBSITE, empty default). - Tests: GitSourceStrategyTest (MockRestServiceServer + pure helpers) + ConfiguredSourcesTest git binding. 155 tests green. - steps.md; refresh CLAUDE.md. Refs #31
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
Adds a
type: gitsource withGitSourceStrategythat indexes Markdown directly from GitHub repos (public/private via token), plugging into theContentSourceStrategyseam (spec 007) — the first newSourceType, with everything downstream unchanged. Higher fidelity than HTML scraping for repos we own.Spec
docs/specs/016-git-markdown-source/{design,behaviors,steps}.mdChanges
GitConfigrecord + optionalContentSource.gitfield (the extension spec 002 deferred)GitSourceStrategy(SourceType.GIT): Trees-API discovery filtered bypathsglobs (SHA = change marker; hard failure throws → source isolated, not mass-deleted), raw-content fetch with a server-side bearer token (never logged), YAML frontmatter + Markdown extraction with Hugo-shortcode cleaning, path → canonical-URL mapping, locale from filename suffixapplication.yaml: exampleoe-website-markdowngit source (disabled; token viaGITHUB_TOKEN_OE_WEBSITE, empty default)Test coverage
GitSourceStrategyTestviaMockRestServiceServer(discovery/filter/SHA, bearer token, discovery-failure isolation, frontmatter/shortcode/URL/locale extraction, fetch-failure skip) + puremapToUrl/localeFromPath/parseMarkdown;ConfiguredSourcesTestgit binding. 155 tests total; both reviews clean.Closes #31
🤖 Generated with Claude Code