Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(hook): nest API response and use Gorm preload to populate repo and build data #1147

Merged
merged 12 commits into from
Sep 16, 2024

Conversation

ecrupper
Copy link
Contributor

Continuing efforts from: #1111

Hook.Repo and Hook.Build.Repo are duplicative, so I pruned Hook.Build.Repo to only include Hook.Build.Repo.ID.

@ecrupper ecrupper requested a review from a team as a code owner June 18, 2024 17:50
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 92.43243% with 28 lines in your changes missing coverage. Please review.

Project coverage is 53.06%. Comparing base (f3b5f5c) to head (9fb6d42).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/webhook/post.go 0.00% 8 Missing ⚠️
database/hook/opts.go 0.00% 4 Missing ⚠️
mock/server/hook.go 0.00% 4 Missing ⚠️
api/hook/create.go 0.00% 2 Missing ⚠️
api/repo/create.go 0.00% 2 Missing ⚠️
database/hook/create.go 77.77% 1 Missing and 1 partial ⚠️
database/hook/update.go 77.77% 1 Missing and 1 partial ⚠️
api/admin/hook.go 0.00% 1 Missing ⚠️
api/hook/redeliver.go 0.00% 1 Missing ⚠️
api/hook/update.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1147      +/-   ##
==========================================
+ Coverage   52.41%   53.06%   +0.65%     
==========================================
  Files         557      559       +2     
  Lines       19433    19722     +289     
==========================================
+ Hits        10185    10466     +281     
- Misses       8682     8688       +6     
- Partials      566      568       +2     
Files with missing lines Coverage Δ
api/types/hook.go 100.00% <100.00%> (ø)
database/hook/count.go 100.00% <ø> (ø)
database/hook/count_repo.go 100.00% <ø> (ø)
database/hook/delete.go 100.00% <100.00%> (ø)
database/hook/get.go 88.88% <100.00%> (+5.55%) ⬆️
database/hook/get_repo.go 91.30% <100.00%> (+3.06%) ⬆️
database/hook/get_webhook.go 88.88% <100.00%> (+5.55%) ⬆️
database/hook/hook.go 52.63% <ø> (ø)
database/hook/last_repo.go 83.33% <100.00%> (+5.55%) ⬆️
database/hook/list.go 77.77% <100.00%> (+6.34%) ⬆️
... and 21 more

database/types/hook_test.go Outdated Show resolved Hide resolved
database/types/hook_test.go Show resolved Hide resolved
plyr4
plyr4 previously approved these changes Sep 11, 2024
database/types/hook.go Outdated Show resolved Hide resolved
@ecrupper ecrupper merged commit ddee444 into main Sep 16, 2024
14 of 16 checks passed
@ecrupper ecrupper deleted the refactor/nested-api/hook branch September 16, 2024 15:49
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.

3 participants