Skip to content

Commit

Permalink
additional logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Feb 16, 2024
1 parent a13fe81 commit ce70d26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion action/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -188072,7 +188072,9 @@ const robot = (app) => {
async function verify(body, address, message) {
const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0);
if (signature) {
return verifySignature(signature, address, message);
const verifyResult = verifySignature(signature, address, message);
console.log(`verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`);
return verifyResult;
}
const txHash = /[0-9a-fA-F]{64}/.exec(body)?.at(0);
if (txHash) {
Expand Down Expand Up @@ -188169,6 +188171,7 @@ const robot = (app) => {
await fail('No owners identified');
return;
}
console.log(`Addresses to check ownership for: ${owners}`);
const invalidAddresses = await multiVerify(bodies, owners, commitShas);
if (!invalidAddresses) {
await fail('Failed to verify owners');
Expand Down
7 changes: 5 additions & 2 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export const robot = (app: Probot) => {
async function verify(body: string, address: string, message: string): Promise<boolean | undefined> {
const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0);
if (signature) {
return verifySignature(signature, address, message);
const verifyResult = verifySignature(signature, address, message);
console.log(`verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`);
return verifyResult;
}

const txHash = /[0-9a-fA-F]{64}/.exec(body)?.at(0);
Expand Down Expand Up @@ -245,6 +247,7 @@ export const robot = (app: Probot) => {
return;
}

console.log(`Addresses to check ownership for: ${owners}`);
const invalidAddresses = await multiVerify(bodies, owners, commitShas);
if (!invalidAddresses) {
await fail('Failed to verify owners');
Expand All @@ -268,6 +271,6 @@ export const robot = (app: Probot) => {
console.error(error);
process.exit(1);
}
}
},
);
};

0 comments on commit ce70d26

Please sign in to comment.