From ece633820aa6829b323598210cc390dfcf5c695c Mon Sep 17 00:00:00 2001 From: bogdan-rosianu Date: Fri, 16 Feb 2024 14:46:33 +0200 Subject: [PATCH] more logs --- action/index.cjs | 4 +++- src/bot.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/action/index.cjs b/action/index.cjs index 55de8f3..6ea67fb 100644 --- a/action/index.cjs +++ b/action/index.cjs @@ -188021,6 +188021,8 @@ const robot = (app) => { mainOwner = newOwners[0]; } const extraOwners = newOwners.filter(x => !originalOwners.includes(x)); + const printableFilenames = files.map(file => file.filename).join(', '); + console.log(`Names of changed files: ${printableFilenames}. original owners=${originalOwners}. new owners: ${newOwners}`); const allOwners = []; const allOwnersToCheck = [mainOwner, ...extraOwners]; let apiUrl = 'https://next-api.multiversx.com'; @@ -188072,7 +188074,7 @@ const robot = (app) => { async function verify(body, address, message) { const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0); if (signature) { - const verifyResult = verifySignature(signature, address, message); + const verifyResult = await verifySignature(signature, address, message); console.log(`verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`); return verifyResult; } diff --git a/src/bot.ts b/src/bot.ts index 8100a76..20affc2 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -55,6 +55,9 @@ export const robot = (app: Probot) => { const extraOwners = newOwners.filter(x => !originalOwners.includes(x)); + const printableFilenames = files.map(file => file.filename).join(', '); + console.log(`Names of changed files: ${printableFilenames}. original owners=${originalOwners}. new owners: ${newOwners}`); + const allOwners: string[] = []; const allOwnersToCheck = [mainOwner, ...extraOwners]; @@ -118,7 +121,7 @@ export const robot = (app: Probot) => { async function verify(body: string, address: string, message: string): Promise { const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0); if (signature) { - const verifyResult = verifySignature(signature, address, message); + const verifyResult = await verifySignature(signature, address, message); console.log(`verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`); return verifyResult; }