charmbracelet / soft-serve

The mighty, self-hostable Git server for the command line🍦
MIT License
5.2k stars 132 forks source link

fix: invalid error on empty repo collabs #466

Closed aymanbagabas closed 7 months ago

aymanbagabas commented 7 months ago

Propagate a more informative error when adding an existing collaborator. Ignore webhooks default branch git reference not found errors because the repo won't have a default branch when it's empty.

Fixes: https://github.com/charmbracelet/soft-serve/issues/464

codecov[bot] commented 7 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (b06b555) 51.96% compared to head (7112a65) 52.02%.

Files Patch % Lines
pkg/webhook/repository.go 25.00% 2 Missing and 1 partial :warning:
pkg/webhook/webhook.go 70.00% 2 Missing and 1 partial :warning:
pkg/webhook/push.go 50.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #466 +/- ## ========================================== + Coverage 51.96% 52.02% +0.06% ========================================== Files 157 157 Lines 13454 13464 +10 ========================================== + Hits 6991 7005 +14 + Misses 5891 5885 -6 - Partials 572 574 +2 ```

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