feat: Add support for project felt#188
Closed
jschuler wants to merge 4 commits intopatternfly:mainfrom
Closed
Conversation
Member
|
@jschuler aspects of this work are available
I'm going to shut this down, because it requires an issue first |
Author
|
@cdcabrera can you provide more information on where aspects of this work are available? Also generally it is better to keep a PR open and ask for an Issue to be created. It comes across as rude otherwise. |
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
project-felt/ai-guidelinescontent to beresolved at startup from a single stub entry in
docs.jsonexpandGithubDirectorycatalog stub type that lists Markdown files via the GitHub Contents API and expands them intoconcrete catalog rows
project-feltURLs to the fetch allowlistinstead of crashing
Changes
catalog.expandGithubDirectory.ts(new) — Core expansion logic: fetches a GitHub directory listing, filters for Markdownfiles, and maps each file to a resolved catalog doc. Includes a repo allowlist for defense in depth. Logs a warning instead of
throwing on empty directories.
docs.embedded.ts— New types:PatternFlyMcpDocsCatalogDocStub,ExpandGithubDirectoryConfig,PatternFlyMcpDocsCatalogSourceto model stub entries and the import-time catalog shape.docs.json— AddedAiGuidelinesentry with anexpandGithubDirectorystub pointing toproject-felt/ai-guidelines/content.patternFly.getResources.ts— CallsexpandGithubDirectoryInCatalogafter loading the catalog. On failure, stripsunresolved stubs and returns the catalog with
isFallback: true.options.defaults.ts— Addedproject-feltGitHub URLs to the allowlist.resource.patternFlyDocsTemplate.ts/tool.patternFlyDocs.ts— Narrowed.filter(Boolean)to proper type guardssince entries may now lack a
pathfield.aiGuidelines.catalog.test.ts,catalog.expandGithubDirectory.test.ts, fixture data, scoped fetch mockhelper, and updated existing tests for the new catalog shape.
Test plan
npx jest— all unit tests passAiGuidelinesentries appear in search results and resource listings