Skip to content

Conversation

Copy link

Copilot AI commented Jan 4, 2026

Implementation Plan for GitInformation Class

  • Create internal GitInformation class in src/LinkDotNet.StringBuilder
    • Add properties for CurrentTag, ShortSha, LongSha, and BranchName
    • Implement logic to retrieve git information using Process to run git commands
    • Add fallback to use Microsoft.SourceLink.GitHub information if git commands fail
    • Handle cases where git is not available
  • Create comprehensive unit tests for GitInformation class
    • Test successful retrieval of git information
    • Test fallback scenarios
    • Test error handling
  • Build and test the changes
    • Run dotnet build to ensure no compilation errors
    • Run dotnet test to ensure all tests pass
  • Code review and security check
    • Request code review
    • Run CodeQL security checker
Original prompt

I want to have a new internal class GitInformation. Ideally with zero configuration and setup from the user.
I want the current tag (if the current hash is associated with one), sha in short and long sha. Name of the branch.
If nothing works you can fallback to "Microsoft.SourceLink.*" package.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants