Skip to content

Adopt ptr727.Utilities HttpClientFactory and drop local copies#257

Merged
ptr727 merged 3 commits into
developfrom
feature/adopt-utilities-httpclientfactory
Jul 10, 2026
Merged

Adopt ptr727.Utilities HttpClientFactory and drop local copies#257
ptr727 merged 3 commits into
developfrom
feature/adopt-utilities-httpclientfactory

Conversation

@ptr727

@ptr727 ptr727 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the local HttpClientFactory and AssemblyInfo copies in LanguageTagsCreate with the shared, reusable versions from ptr727.Utilities 4.0.7 (stable release).

  • Reference ptr727.Utilities (drops the now-transitive Microsoft.Extensions.Http.Resilience direct reference).
  • Delete LanguageTagsCreate/HttpClientFactory.cs and LanguageTagsCreate/AssemblyInfo.cs.
  • Repoint the download call in CreateTagData.cs to Utilities.HttpClientFactory.GetClient().GetStreamAsync(...).
  • Wire the library's ILogger logging via Utilities.LogOptions.SetFactory(LoggerFactory.CreateLoggerFactory()) in Program.cs (captured once and shared).

Behavioral note

The download User-Agent now comes from the library's AOT-safe AssemblyInfo (AppName/AppVersion) instead of the old ReleaseVersion. Cosmetic.

Verification

  • dotnet build clean (0 warnings / 0 errors).
  • dotnet format style --verify-no-changes clean.
  • dotnet test - 296 passed.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 10, 2026 18:24
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (adba4dc) to head (f5d7ca3).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #257   +/-   ##
========================================
  Coverage    99.76%   99.76%           
========================================
  Files           15       15           
  Lines       232994   232994           
  Branches       243      243           
========================================
  Hits        232450   232450           
  Misses         462      462           
  Partials        82       82           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the LanguageTagsCreate codegen tool to stop using local copies of HttpClientFactory and AssemblyInfo, and instead consume the shared implementations from the external ptr727.Utilities package - while wiring the utilities package logging into the existing Serilog-based logger setup.

Changes:

  • Add ptr727.Utilities as a dependency (and centralize its version in Directory.Packages.props), removing the tool’s direct dependency on Microsoft.Extensions.Http.Resilience.
  • Delete the local LanguageTagsCreate/HttpClientFactory.cs and LanguageTagsCreate/AssemblyInfo.cs copies.
  • Switch downloads to Utilities.HttpClientFactory.GetClient().GetStreamAsync(...) and configure Utilities.LogOptions to use the repo’s logger factory.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
LanguageTagsCreate/Program.cs Hooks ptr727.Utilities logging into the existing logger factory setup.
LanguageTagsCreate/LanguageTagsCreate.csproj Swaps the tool’s dependency from local Http/Resilience usage to ptr727.Utilities.
LanguageTagsCreate/HttpClientFactory.cs Removes the local HTTP client + resilience implementation (now provided by ptr727.Utilities).
LanguageTagsCreate/CreateTagData.cs Repoints file download stream acquisition to Utilities.HttpClientFactory.
LanguageTagsCreate/AssemblyInfo.cs Removes the local assembly metadata helper (now provided by ptr727.Utilities).
Directory.Packages.props Adds central version pin for ptr727.Utilities.

Comment thread LanguageTagsCreate/Program.cs Outdated
Comment thread Directory.Packages.props Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 10, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread Directory.Packages.props
@ptr727
ptr727 merged commit be1c95a into develop Jul 10, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/adopt-utilities-httpclientfactory branch July 10, 2026 20:09
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