Repository navigation
fix(discovery): accept boolean doc-target as onboarding - #9
Merged
Merged
Conversation
The doc-target property is defined at organization level as a boolean, so GitHub answers it with JSON true or false. DocTarget::from() required a string and returned null for true, leaving onboarded repositories undiscovered. Boolean true now onboards with the conventional docs directory, while a non-empty string still selects the directory it names. Boolean false, null, an absent property, and blank or non-string values stay off the site. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Onboarding a repository is supposed to be exactly one repository custom property,
doc-target. The organization defines it astrue_false, so the API answers with a JSON boolean, andwebinertia/message-busandwebinertia/messagebus-eventboth carrydoc-target: truetoday.DocTarget::from()required a string and returned it as the documentation directory, so a booleantruereturnednulland the repository was never discovered at all. Onboarding did not work.truenow onboards the repository withdocsas the convention documentation directory. A non-empty string still names a directory explicitly and is trimmed.false,null, an absent property, a blank string, and any other type are not onboarded.Docblocks in
DocTarget,Project, andGitHubProjectSourcenow describe both accepted forms.Verification
mago format --check,mago lint,mago analyze: cleanphpunit: 414 tests, 843 assertionstest/unit/Discovery/DocTargetTest.phpcover boolean true, boolean false, absent, null,docs, a paddeddocs, empty, whitespace-only, and a non-string non-boolean value