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

Use rule display name as profile rule name default #4363

Merged

Conversation

eleftherias
Copy link
Contributor

If a profile does not have a custom name set for the rule, then the rule display name should be used as a default.

Summary

If a profile does not have a custom name set for the rule, then the rule type display name should be used as a default.
If neither of the above exist, then the rule type name should be used.

Fixes #4251

Examples

Profile doesn't have custom rule name overrides. Rule types all have display names.

Screenshot 2024-09-04 at 15 36 38

Profile has some custom rule name overrides. Rule types all have display names.

Screenshot 2024-09-04 at 15 36 22

Profile has some custom rule name overrides. Rule types don't have display names.

Screenshot 2024-09-04 at 15 43 01

Profile doesn't have custom rule name overrides. Rule types don't have display names.

Screenshot 2024-09-04 at 15 49 35

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@coveralls
Copy link

coveralls commented Sep 4, 2024

Coverage Status

coverage: 53.312% (+0.03%) from 53.28%
when pulling 1201dc9 on eleftherias:4251-profile-rule-display-name
into 9a554ef on stacklok:main.

Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

Can you check that this produces expected results when you go a get of the profile after creating it?

evankanderson
evankanderson previously approved these changes Sep 6, 2024
evankanderson
evankanderson previously approved these changes Sep 9, 2024
If a profile does not have a custom name set for the rule, then the rule display name should be used as a default.

Fix mindersec#4251
@eleftherias eleftherias merged commit 84afe00 into mindersec:main Sep 10, 2024
20 checks passed
@eleftherias eleftherias deleted the 4251-profile-rule-display-name branch September 10, 2024 13:21
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.

Use displayName in detailed profile view CLI
3 participants