Skip to content

Use new Date() in log function in automatically-redelivering-failed-deliveries-for-a-repository-webhook.md#44806

Open
mcdurdin wants to merge 1 commit into
github:mainfrom
mcdurdin:patch-1
Open

Use new Date() in log function in automatically-redelivering-failed-deliveries-for-a-repository-webhook.md#44806
mcdurdin wants to merge 1 commit into
github:mainfrom
mcdurdin:patch-1

Conversation

@mcdurdin

Copy link
Copy Markdown

Why:

new Date(value) returns value as a date, whereas Date(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:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

@github-actions

Copy link
Copy Markdown
Contributor

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 links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
webhooks/using-webhooks/automatically-redelivering-failed-deliveries-for-a-repository-webhook.md fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Jun 18, 2026
@Sharra-writes Sharra-writes added content This issue or pull request belongs to the Docs Content team webhooks Content related to webhooks and removed triage Do not begin working on this issue until triaged by the team labels Jul 2, 2026
@Sharra-writes

Copy link
Copy Markdown
Contributor

@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)}.`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 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():

Suggested change
} 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team webhooks Content related to webhooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants