Skip to content

Conversation

@alexandear
Copy link
Contributor

The optimization in the RepositoryRulesetRules.MarshalJSON hurts readability and maintainability. I propose removing it because the append function is smart enough to allocate memory efficiently.

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.44%. Comparing base (1830689) to head (6286ea6).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
github/rules.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3875   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files         200      200           
  Lines       14494    14502    +8     
=======================================
+ Hits        13399    13407    +8     
  Misses        895      895           
  Partials      200      200           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @alexandear!
LGTM.
Merging.

@gmlewis gmlewis changed the title refactor: Simplify JSON marshaling for RepositoryRulesetRules chore: Simplify JSON marshaling for RepositoryRulesetRules Dec 11, 2025
@gmlewis gmlewis merged commit c392e6f into google:master Dec 11, 2025
6 of 7 checks passed
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