Skip to content

Add client-side validation of git variables #101

Description

@f00f

I regularly use characters in my commit messages which are invalid for AWS tags. The result is a cloud-side error like this:

1 validation error detected: Value '' failed to satisfy constraint: Member must satisfy regular expression pattern: [\p{L}\p{Z}\p{N}_.:/=+-@]*

The problem is that the time to error is quite long, so I would prefer a client-side error. I can see how this could be problematic as people might use git variables in places other than AWS tags and don't care about this validation - or might need other validations.

Maybe this is not even the right place to add the validation, and a generic validation plugin might be more suitable. E.g.

plugins:
  validation:
    awsTags:
      - ${git:messageSubject}
    awsApiStageName:
      - ${git:repository}
      - ${git:branch}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions