From df6f62e30acfd9f6bce79f5a9f31d79de8e49a28 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 28 Feb 2024 18:44:09 +0100 Subject: [PATCH] changed comment to show how to use the command --- src/cron.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cron.ts b/src/cron.ts index 88e5228..81abdad 100644 --- a/src/cron.ts +++ b/src/cron.ts @@ -106,7 +106,7 @@ export const getAllRFCRemarks = async ( const rfc = await subsquareApi.fetchReferenda(index); const confirmedBlock = rfc.onchainData.timeline.find(({ name }) => name === "Confirmed"); if (confirmedBlock) { - const blockDate = await getBlockDate(confirmedBlock.indexer.blockTime, api); + const blockDate = await getBlockDate(confirmedBlock.indexer.blockHeight, api); if (startDate > blockDate) { logger.info(`Confirmation of referenda #${index} happened before the previous check. Ignoring.`); continue; @@ -170,7 +170,8 @@ export const cron = async (startDate: Date, owner: string, repo: string, octokit const closedMatch = completed.find(({ hash }) => hash === tx.method.hash.toHex() || hash === tx.method.toHex()); if (closedMatch) { logger.info(`Found completed referenda for PR #${pr}`); - const msg = `/rfc process ${closedMatch.executedHash}`; + const command = `/rfc process ${closedMatch.executedHash}`; + const msg = "PR can be merged. Write the following command to trigger the bot" + `\n\n\`${command}\``; rows.push([ `${owner}/${repo}#${pr}`, `