fix(GitHub Node): File Create operation prevent duplicated base64 encoding (#10040)

This commit is contained in:
Marcus
2024-07-12 17:37:00 +02:00
committed by GitHub
parent 46d6edc2a4
commit 9bcc926a91
2 changed files with 17 additions and 6 deletions

View File

@@ -114,3 +114,8 @@ export async function githubApiRequestAllItems(
} while (responseData.headers.link?.includes('next'));
return returnData;
}
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);
}