Conversation
baronfel
left a comment
There was a problem hiding this comment.
This is pretty much exactly what I was hoping to see 👍
|
I'm going to wait to publish this until the SourceLink PR lands in case things change, specifically of interest are:
Edit: Published to get eyes / feedback on this; it's still a chance that I'll need to update this if the SourceLink PR change's its property name. |
nkolev92
left a comment
There was a problem hiding this comment.
Just a question about the potential risk here.
|
For the NuGet shepherd, let's wait for a review from @tmat before merging. |
|
Is there a potential for private info leak if we publish the branch name by default? For Repository URL we require the project to explicitly set Branch name might potentially include code names, etc. |
|
Good point - the commit sha is unique enough to not worry, but the branch could be behind the existing |
|
Happy to re-use the existing flag, mostly was bringing up the possibility of a new flag for completeness. |
|
Would pack even set the repository details if the repository url was never provided? |
|
Edit: This comment is incorrect; see below. |
|
Perfect, that works for me. That's also the pattern we've used for the SDK Container source control information linkages. |
|
Sounds good. Do we have a test? |
|
Should also add a note to the documentation: https://github.com/dotnet/sourcelink/blob/669979bf371a587c908f732499df0ed883cd5d6c/docs/README.md?plain=1#L44 |
|
We don't have a test covering this part, and when I add one I'm not seeing the same behavior I see from the command line. I'm looking into it, but let's hold off on merging until we understand the difference. Edit: OK I at least understand the difference. NuGet Package Explorer doesn't show the raw nuspec XML and seems to hide the |
…yUrl This is a follow up PR based on NuGet/NuGet.Client#5923. Update the README to specify that publishing `$(SourceBranchName)` into `$(RepositoryBranch)' is also controlled by the `$(PublishRepositoryUrl)` property.
Available @ dotnet/sourcelink#1252 |
…yUrl (#1252) This is a follow up PR based on NuGet/NuGet.Client#5923. Update the README to specify that publishing `$(SourceBranchName)` into `$(RepositoryBranch)' is also controlled by the `$(PublishRepositoryUrl)` property.
|
Ok, we've got sourcelink merged and flowing to the dotnet/sdk again, so I think this is good to review+merge! |
Bug
Fixes: NuGet/Home#13625
Description
This is a companion PR for dotnet/sourcelink#1248. Once that change lands and sourcelink is emitting the source branch name, this PR consumes that value and sets it to
RepositoryBranchas part of NuGet pack.PR Checklist