Restrict branch and environment wildcards to include '*'
What does this MR do and why?
Implements #480111 (closed).
This addresses a follow-up from !161866 (comment 2064565331):
It seems like our wildcard doesn't require
*
to create one.
This applies to:
- Environment scope dropdown (Secrets Manager, CI/CD Settings) (docs)
- Branches dropdown (Secrets Manager) (docs).
These dropdowns now only allow the user to create a wildcard environment/branch if the *
character is included in the search term.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Secrets Manager
Before | After (without * ) |
After (with * ) |
---|---|---|
CI/CD Settings > Variables
How to set up and validate locally
- Enable the feature flag.
Feature.enable(:ci_tanukey_ui)
- Visit the Secrets Manager form.
<path-to-project>/-/secrets/new
- Verify that the Environments and Branches field will only show the Create wildcard button if there is a
*
character in the search string and if there are no search results to show.- This also applies to the Environments dropdown in the CI/CD Settings > Variables > Add variable form.