feat(GitHub Node): Add workflow resource operations (#10744)

This commit is contained in:
Idan Fishman
2024-10-23 13:20:20 +03:00
committed by GitHub
parent 4f1816e03d
commit d309112647
3 changed files with 246 additions and 2 deletions

View File

@@ -119,3 +119,13 @@ export function isBase64(content: string) {
const base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
return base64regex.test(content);
}
export function validateJSON(json: string | undefined): any {
let result;
try {
result = JSON.parse(json!);
} catch (exception) {
result = undefined;
}
return result;
}