templating icon indicating copy to clipboard operation
templating copied to clipboard

Add a context binding for repo-level information

Open baronfel opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe.

It is often useful to know where the repo root is when creating files - sometimes because you need to add a repo- or workspace-level in the heirarchy, or because you need to know something about the source provider information. Surfacing that information as a bindable piece of context enables template authors to use that information for their own templates without having to resort to shelling out.

Describe the solution you'd like.

We should define a new component GUID and implementation for the .NET CLI host that

  • discovers the source control root of the CWD
  • discovers source provider information similar to sourcelink
    • provider name, if any
    • primary upstream name, if any
    • current commit identifier, if any and makes this information bindable via the existing context-binding mechanism for use in other symbols.

Additional context

No response

baronfel avatar Oct 22 '25 20:10 baronfel