Skip to content

Add a context binding for repo-level information #9463

@baronfel

Description

@baronfel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiRelated to public API changes/bugs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions