• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / minder / 10848738972
53%

Build:
DEFAULT BRANCH: main
Ran 13 Sep 2024 12:12PM UTC
Jobs 1
Files 249
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Sep 2024 12:03PM UTC coverage: 53.333% (+0.2%) from 53.087%
10848738972

push

github

web-flow
Derive profile name from display name in `ProfileService.CreateProfile` (#4335)

* Derive profile name from display name in `ProfileService.CreateProfile`

Currently, clients of the API are required to derive the profile name from the display name using various transformations.
This results in duplicated logic across the ecosystem, increasing complexity and potential inconsistencies.

This commit scopes the logic to derive the profile name from the display name to the ProfileService.CreateProfile endpoint.
By centralizing this logic, we reduce redundancy and simplify client code.
Clients of the API are no longer need to implement logic to deriive the profile name when creating a new profile.

Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>

* Derive profile name from display name in `ProfileService.CreateProfile`

Define regexes to be a global but non exported variable.
Refactor unit test to test `DeriveProfileNameFromDisplayName` instead of `cleanDisplayName` which is not exported anymore.

Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>

* Derive profile name from display name in `ProfileService.CreateProfile`

Handle cases where the derived profile name already exists in the same project.

Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>

* Derive profile name from display name in `ProfileService.CreateProfile`

Remove empty line

Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>

* Derive profile name from display name in `ProfileService.CreateProfile`

Added additional test to increase coverage

Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>

* Derive profile name from display name in `ProfileService.CreateProfile`

Fixed duplicated test names
Fixed DeriveProfileNameFromDisplayName to handle the edge cases where the name will exceed 63 characters once we append the counter.
Added unit-tests for edge cases

Signed-off-by: Kugamoorthy Gajananan <gajananan... (continued)

59 of 61 new or added lines in 2 files covered. (96.72%)

13705 of 25697 relevant lines covered (53.33%)

43.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10848738972.1 13 Sep 2024 12:12PM UTC 0
53.33
GitHub Action Run
Source Files on build 10848738972
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10848738972
  • 6cf65030 on github
  • Prev Build on main (#10848606033)
  • Next Build on main (#10849733714)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc