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

improve IsAlreadyBanned #416

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

rsoaresd
Copy link
Contributor

@rsoaresd rsoaresd commented Jul 18, 2024

Description

  • improve IsAlreadyBanned func to return the BannedUser when the user was already banned
  • fix some assertions and clean imports being imported more than once

Issue ticket number and link

SANDBOX-674

Associated PRs:

  • wa 12

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.47%. Comparing base (c8ee880) to head (7d9fe84).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #416      +/-   ##
==========================================
+ Coverage   78.45%   78.47%   +0.02%     
==========================================
  Files          48       48              
  Lines        2010     2012       +2     
==========================================
+ Hits         1577     1579       +2     
  Misses        375      375              
  Partials       58       58              
Files Coverage Δ
...rs/toolchaincluster/toolchaincluster_controller.go 82.24% <100.00%> (ø)
pkg/banneduser/banneduser.go 100.00% <100.00%> (ø)

Copy link
Collaborator

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

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

Looks good but it probably would make sense to rename the function.

pkg/banneduser/banneduser.go Outdated Show resolved Hide resolved
pkg/banneduser/banneduser.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rajivnathan rajivnathan left a comment

Choose a reason for hiding this comment

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

Looks good once we've renamed the function

@rsoaresd rsoaresd merged commit e228627 into codeready-toolchain:master Jul 19, 2024
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.

4 participants