Skip to content

Add a context binding for repo-level information #9463

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiRelated to public API changes/bugstriage:transfer-to-sdkIssue should be transferred to dotnet/sdk

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions