Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/redeliver-failed-deliveries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ jobs:
WORKFLOW_REPO_NAME: ${{ github.event.repository.name }}
WORKFLOW_REPO_OWNER: ${{ github.repository_owner }}
run: |
node .github/workflows/scripts/redeliver-failed-deliveries.mjs
node .github/workflows/scripts/redeliver-failed-deliveries.mjs > $GITHUB_STEP_SUMMARY
cat $GITHUB_STEP_SUMMARY
8 changes: 4 additions & 4 deletions .github/workflows/scripts/redeliver-failed-deliveries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ async function checkAndRedeliverWebhooks(TOKEN, ORGANIZATION_NAME, HOOK_ID, LAST
// Record the time that this script started redelivering webhooks.
const newWebhookRedeliveryTime = Date.now().toString();

console.log(`DEBUG: Previous REDELIVERY TIME: ${lastStoredRedeliveryTime}`);
console.log(`DEBUG: Caclulated REDELIVERY TIME: ${lastWebhookRedeliveryTime}`);
console.log(`DEBUG: New REDELIVERY TIME : ${newWebhookRedeliveryTime}`);
// console.log(`DEBUG: Previous REDELIVERY TIME: ${lastStoredRedeliveryTime} ${Date(lastStoredRedeliveryTime)}`);
// console.log(`DEBUG: Caclulated REDELIVERY TIME: ${lastWebhookRedeliveryTime} ${Date(lastWebhookRedeliveryTime)}`);
// console.log(`DEBUG: New REDELIVERY TIME : ${newWebhookRedeliveryTime} ${Date(newWebhookRedeliveryTime)}`);

// Get the webhook deliveries that were delivered after `lastWebhookRedeliveryTime`.
const deliveries = await fetchWebhookDeliveriesSince({
Expand Down Expand Up @@ -84,7 +84,7 @@ async function checkAndRedeliverWebhooks(TOKEN, ORGANIZATION_NAME, HOOK_ID, LAST
failedDeliveryIDs.length
} failed webhook deliveries out of ${
deliveries.length
} total deliveries since ${Date(lastWebhookRedeliveryTime)}.`
} total deliveries between ${Date(lastWebhookRedeliveryTime)} and ${Date(newWebhookRedeliveryTime)}.`
);
} catch (error) {
// If there was an error, log the error so that it appears in the workflow run log, then throw the error so that the workflow run registers as a failure.
Expand Down
Loading