Skip to content

fix(discovery): accept boolean doc-target as onboarding - #9

Merged
tyrsson merged 1 commit into
1.0.xfrom
tyrsson-fix-doc-target-contract
Nov 14, 2026
Merged

tyrsson merged 1 commit into
1.0.xfrom
tyrsson-fix-doc-target-contract

Conversation

@tyrsson

@tyrsson tyrsson commented Nov 14, 2026

Copy link
Copy Markdown
Member

Onboarding a repository is supposed to be exactly one repository custom property, doc-target. The organization defines it as true_false, so the API answers with a JSON boolean, and webinertia/message-bus and webinertia/messagebus-event both carry doc-target: true today.

DocTarget::from() required a string and returned it as the documentation directory, so a boolean true returned null and the repository was never discovered at all. Onboarding did not work.

true now onboards the repository with docs as 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, and GitHubProjectSource now describe both accepted forms.

Verification

  • mago format --check, mago lint, mago analyze: clean
  • phpunit: 414 tests, 843 assertions
  • Cases in test/unit/Discovery/DocTargetTest.php cover boolean true, boolean false, absent, null, docs, a padded docs, empty, whitespace-only, and a non-string non-boolean value

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

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tyrsson
tyrsson merged commit 45f1ac0 into 1.0.x Nov 14, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant