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(secret): use server API types for secret #1209

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

ecrupper
Copy link
Contributor

Continuing refactor efforts. Only a few more!

@ecrupper ecrupper requested a review from a team as a code owner October 17, 2024 17:14
@@ -7,12 +7,13 @@
"reflect"
"testing"

"github.com/DATA-DOG/go-sqlmock"

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
File is not gci-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(github.com/go-vela) --custom-order (gci)

)

// Create creates a new secret.
func (c *client) Create(ctx context.Context, sType, org, name string, s *library.Secret) (*library.Secret, error) {
func (c *client) Create(ctx context.Context, sType, org, name string, s *api.Secret) (*api.Secret, error) {

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)

)

// Get captures a secret.
func (c *client) Get(ctx context.Context, sType, org, name, path string) (s *library.Secret, err error) {
func (c *client) Get(ctx context.Context, sType, org, name, path string) (s *velaAPI.Secret, err error) {

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 95.54264% with 23 lines in your changes missing coverage. Please review.

Project coverage is 55.17%. Comparing base (b0e091f) to head (9f7086c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/types/secret.go 95.30% 13 Missing ⚠️
mock/server/secret.go 0.00% 4 Missing ⚠️
api/secret/create.go 0.00% 2 Missing ⚠️
api/admin/secret.go 0.00% 1 Missing ⚠️
api/secret/list.go 0.00% 1 Missing ⚠️
api/secret/update.go 0.00% 1 Missing ⚠️
api/webhook/post.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1209      +/-   ##
==========================================
- Coverage   56.17%   55.17%   -1.00%     
==========================================
  Files         584      586       +2     
  Lines       21291    31488   +10197     
==========================================
+ Hits        11960    17374    +5414     
- Misses       8717    13500    +4783     
  Partials      614      614              
Files with missing lines Coverage Δ
database/secret/create.go 60.86% <100.00%> (-0.11%) ⬇️
database/secret/delete.go 100.00% <100.00%> (ø)
database/secret/get.go 88.46% <100.00%> (+0.96%) ⬆️
database/secret/get_org.go 90.62% <100.00%> (-0.29%) ⬇️
database/secret/get_repo.go 91.17% <100.00%> (-0.50%) ⬇️
database/secret/get_team.go 92.30% <100.00%> (+0.64%) ⬆️
database/secret/list.go 76.92% <100.00%> (+1.92%) ⬆️
database/secret/list_org.go 82.35% <100.00%> (ø)
database/secret/list_repo.go 83.01% <100.00%> (-0.32%) ⬇️
database/secret/list_team.go 83.78% <100.00%> (ø)
... and 19 more

... and 549 files with indirect coverage changes

Copy link
Contributor

@KellyMerrick KellyMerrick left a comment

Choose a reason for hiding this comment

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

lgtm

@ecrupper ecrupper merged commit 37f2c35 into main Oct 17, 2024
13 of 16 checks passed
@ecrupper ecrupper deleted the refactor/nested-api/secret branch October 17, 2024 18:18
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