dotnet / dotnet/templating

Add a context binding for repo-level information

Open
#9,463 0 comments 0 reactions 0 assignees View on GitHub
area: api triage:transfer-to-sdk
Dominant language
No language data
Stars
1.7k
Forks
399
Avg merge
3d 5h
Merged PRs (30d)
39

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.