Skip to content

Update API reference copy to nearest .github in repo#41

Merged
xavierjohn merged 1 commit into
mainfrom
xavier/fix_targ
Jul 6, 2026
Merged

Update API reference copy to nearest .github in repo#41
xavierjohn merged 1 commit into
mainfrom
xavier/fix_targ

Conversation

@xavierjohn

Copy link
Copy Markdown
Owner

Refactor Trellis.ApiReference.targets to copy API reference markdown files to the nearest existing .github directory up to the .git repo root, rather than always using the repo root. Falls back to creating .github at the repo root if none exists. Improves flexibility for multi-project repos and ensures files are only copied within the intended repository boundary. Updates comments and variable names for clarity.

Refactor Trellis.ApiReference.targets to copy API reference markdown files to the nearest existing .github directory up to the .git repo root, rather than always using the repo root. Falls back to creating .github at the repo root if none exists. Improves flexibility for multi-project repos and ensures files are only copied within the intended repository boundary. Updates comments and variable names for clarity.
Copilot AI review requested due to automatic review settings July 6, 2026 06:33
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results

330 tests  ±0   330 ✅ ±0   51s ⏱️ -2s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit ce9a340. ± Comparison against base commit fc0c1fc.

@xavierjohn
xavierjohn merged commit 466f962 into main Jul 6, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the packaged MSBuild targets used for syncing Trellis API reference markdown into a repository’s .github/ folder, so the destination is the nearest existing .github directory when walking upward from the project directory, bounded by the nearest .git repo root (with a fallback to creating .github/ at the repo root). This improves behavior in multi-project / nested-repo layouts while preventing copies from escaping the repository boundary.

Changes:

  • Change destination resolution to prefer the nearest existing .github/ directory between the project and the .git repo root.
  • Add explicit repo-boundary guarding logic to avoid selecting a .github/ directory above the discovered .git root.
  • Rename/adjust internal properties and comments for clarity (e.g., _TrellisOutputDir, _TrellisNearestGitHub, expanded explanation of the unrolled walk).

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.

2 participants