change regexp to accept deeper level paths

This commit is contained in:
Sunil Kumar
2023-07-27 00:48:17 +05:30
parent 7457f573e9
commit 7b1a4fa8e4

View File

@@ -2067,7 +2067,7 @@ const syncSecretsWindmill = async ({
Object.keys(secrets).forEach(
(key) => {
const pattern = new RegExp('^([a-zA-Z0-9])\/([a-zA-Z-0-9-_])+\/([a-zA-Z0-9-_])+')
const pattern = new RegExp('^[uf]+[\/](?:[a-zA-Z0-9-_]+[\/])*([a-zA-Z0-9-_]+)')
if((key.startsWith("u/") || key.startsWith("f/")) && pattern.test(key)) {
if(secretsResList.includes(key)) {
modifiedFormatForUpdateSecretInjection.push({