:sparkles: feat: Refactor scorecard serve cmd
What kind of change does this PR introduce?
feature
- [x] PR title follows the guidelines defined in our pull request documentation
What is the current behavior?
The current serve uses Go’s built-in http package, which lacks modern features. And It fails to correctly aggregate the total score, and parameters and details cannot be retrieved properly.
What is the new behavior (if this is a feature change)?**
This PR refactors the serve component by migrating the original CLI-based parameter input to a RESTful API interface. Additionally, I replaced the native net/http logic with the chi router, which is lightweight yet expressive and well-suited for modular HTTP services in Go.
- [ ] Tests for the changes have been added (for bug fixes/features)
Which issue(s) this PR fixes
Related to #4627
Don't have time to look in-depth, but wanted to make one comment:
The current serve uses Go’s built-in http package, which lacks modern features
What features specifically? Go 1.22 made good strides at least for the routing https://go.dev/blog/routing-enhancements
Sorry. I'm unfamiliar with new features of Go. It seems that chi isn't necessary. I will revert it. Thx.
Codecov Report
:x: Patch coverage is 0% with 189 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 67.86%. Comparing base (353ed60) to head (327a826).
:warning: Report is 231 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4665 +/- ##
==========================================
+ Coverage 66.80% 67.86% +1.05%
==========================================
Files 230 249 +19
Lines 16602 19069 +2467
==========================================
+ Hits 11091 12941 +1850
- Misses 4808 5268 +460
- Partials 703 860 +157
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
This pull request has been marked stale because it has been open for 10 days with no activity
This pull request has been marked stale because it has been open for 10 days with no activity
This pull request has been marked stale because it has been open for 10 days with no activity
Back from vacation, going through my backlog from before and reopenning PRs that went stale waiting for me.