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

Change defaults for pull request rules #4773

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

eleftherias
Copy link
Contributor

Summary

We had previously added a function that defaulted the rule configuration if it was empty, in order to make the experience smoother for the UI user.
Since then, the UI has made a change that doesn't send an empty configuration by default, and instead sets some of the fields.

This change ensures that any fields that are unset get a default value.

We should consider moving default values to the rule schema itself, and marking the field as required, but that will be done as part of a larger rule validation epic.

Fixes mindersec/minder-rules-and-profiles#184

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.

@eleftherias eleftherias requested a review from jhrozek October 17, 2024 11:42
@eleftherias
Copy link
Contributor Author

I have manually tested locally with the latest frontend to ensure the bug is fixed. Tested with both a nil ecosystem_config and an empty array ecosystem_config.

@eleftherias eleftherias merged commit d3f88cf into mindersec:main Oct 17, 2024
26 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.

Trusty rule does not require that an ecosystem is set
2 participants