Skip to content

Fallback to SolutionDir when git root is unavailable for skill copy#100

Merged
kzu merged 1 commit intomainfrom
copilot/use-solution-dir-as-base-dir
Apr 14, 2026
Merged

Fallback to SolutionDir when git root is unavailable for skill copy#100
kzu merged 1 commit intomainfrom
copilot/use-solution-dir-as-base-dir

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

When SourceLink cannot resolve a git root, CopyStructIdSkill silently skips copying SKILL.md to .github/skills/structid/. This leaves consumers without the skill file in non-git or SourceLink-unconfigured scenarios.

Changes

  • StructId.targets: After attempting to resolve _StructIdSkillRepoRoot from the git SourceRoot, falls back to $(SolutionDir) if the result is still empty (and SolutionDir is defined/not *Undefined*). The copy is only skipped when neither source can provide a base directory.
<PropertyGroup>
  <_StructIdSkillRepoRoot>@(_StructIdSkillSourceRoot)</_StructIdSkillRepoRoot>
  <_StructIdSkillRepoRoot Condition="'$(_StructIdSkillRepoRoot)' == '' and '$(SolutionDir)' != '' and '$(SolutionDir)' != '*Undefined*'">$(SolutionDir)</_StructIdSkillRepoRoot>
</PropertyGroup>

@kzu
Copy link
Copy Markdown
Member

kzu commented Apr 14, 2026

81 passed 81 passed
81 passed 81 passed
81 passed 81 passed

🧪 Details on Ubuntu 24.04.4 LTS
🧪 Details on macOS Unix 15.7.4
🧪 Details on Microsoft Windows 10.0.26100

from retest v1.1.0 on .NET 10.0.6 with 💜 by @devlooped

@kzu kzu merged commit 4d84d7a into main Apr 14, 2026
6 checks passed
@kzu kzu deleted the copilot/use-solution-dir-as-base-dir branch April 14, 2026 20:40
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