Fixing label values of workflow names with spaces (#134)

This commit is contained in:
Koushik Dey
2021-05-05 15:55:02 +05:30
committed by GitHub
parent d332939666
commit ac49626466
3 changed files with 11 additions and 8 deletions
+6
View File
@@ -169,6 +169,12 @@ export async function getDeploymentConfig(): Promise<DeploymentConfig> {
return Promise.resolve(deploymentConfig);
}
export function normaliseWorkflowStrLabel(workflowName: string): string {
workflowName = workflowName.startsWith('.github/workflows/') ?
workflowName.replace(".github/workflows/", "") : workflowName;
return workflowName.replace(/ /g, "_");
}
export function sleep(timeout: number) {
return new Promise(resolve => setTimeout(resolve, timeout));
}