yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
974 stars 91 forks source link

style: add GitHub action to validate exceptions JSON sorting #295

Closed doronkg closed 3 months ago

doronkg commented 4 months ago

What this PR does / why we need it?

This PR adds a custom GitHub action to validate that the exceptions JSON files are properly sorted. Once a PR is submitted to main branch with modifications under pkg/kor/exceptions, this workflow is invoked.

If unsorted JSON files are found, the workflow will fail and provide the contributor with:

  1. List of the unsorted files
  2. Command to sort all the unsorted files on-demand

Example: image

PR Checklist

GitHub Issue

[XX-XX]

Notes for your reviewers

The sorting validation is based on jq in Bash.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.96%. Comparing base (5b9c270) to head (c927585). Report is 3 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #295 +/- ## ======================================= Coverage 40.96% 40.96% ======================================= Files 58 58 Lines 2910 2910 ======================================= Hits 1192 1192 Misses 1530 1530 Partials 188 188 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.