Use new Date() in log function in automatically-redelivering-failed-deliveries-for-a-repository-webhook.md#44806
Use new Date() in log function in automatically-redelivering-failed-deliveries-for-a-repository-webhook.md#44806mcdurdin wants to merge 1 commit into
new Date() in log function in automatically-redelivering-failed-deliveries-for-a-repository-webhook.md#44806Conversation
…es-for-a-repository-webhook.md
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
|
@mcdurdin I'm checking with the appropriate team to make sure you're not encountering a bug, and I'll let you know what they tell me. |
| } failed webhook deliveries out of ${ | ||
| deliveries.length | ||
| } total deliveries since ${Date(lastWebhookRedeliveryTime)}.` | ||
| } total deliveries since ${new Date(lastWebhookRedeliveryTime)}.` |
There was a problem hiding this comment.
👋 Thank you for catching this! It looks like we do have a bug in our documentation.
Based on tests I ran locally, it looks like we should be converting the string to a Number before passing it to new Date():
| } total deliveries since ${new Date(lastWebhookRedeliveryTime)}.` | |
| } total deliveries since ${new Date(Number(lastWebhookRedeliveryTime))}.` |
Can you confirm that you are obtaining the expected output through this suggestion?
Why:
new Date(value)returnsvalueas a date, whereasDate(value)returns now as a date.What's being changed (if available, include any code snippets, screenshots, or gifs):
One word change.
Check off the following: