ModusCreateOrg / gimbal

Web Performance Auditing tooling
https://labs.moduscreate.com/gimbal-web-performance-audit-budgeting
MIT License
115 stars 8 forks source link

feat(last-value): allow storage to have a command prefix #139

Closed mitchellsimoens closed 5 years ago

mitchellsimoens commented 5 years ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

Currently, the last value storage plugins will get/save using the command. The issue is during pull requests or non-master branches, these runs would all get lumped into one pot. These runs need some way to be sandboxed from each other.

Issue Number: N/A

What is the new behavior?

I introduced a commandPrefix config for the mysql and sqlite plugins.This can be a string or an array of strings where it will use the first that does not have a missing variable replacement.

Does this introduce a breaking change?

Other information

The regex for the variable replacement was greedy so had to make it non-greedy. I also then expanded it to optionally have a true and false values. The variable replacement can now take these values:

${env:SOME_ENV_VAR}
${env:SOME_ENV_VAR, true, false}

The true and false will also be cast to proper booleans.