Skip to content

Conversation

@kierramarie
Copy link
Member

@kierramarie kierramarie commented Nov 14, 2024

Description

Added validation to check for proper prefix.

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@kierramarie
Copy link
Member Author

/run pipeline

alex-reiff
alex-reiff previously approved these changes Nov 20, 2024
Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

Please consider the following changes, but don't feel obliged to adopt

Would it be neater

    condition = anytrue([
      var.prefix == null,
      can(regex("^([a-z]|[a-z][-a-z0-9]{0,14}[a-z0-9])$", var.prefix))
    ])

Either

null

the regex is
a single lower letter,
or,
a single lower letter, ending in letter or number with 0 to 14 characters (making 16 total) in the middle.

This avoids the coalesce commands with an arbitrary string and the need for a specific length validation

@kierramarie
Copy link
Member Author

Closing because it doesn't use COS

@kierramarie kierramarie closed this Dec 5, 2024
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