Skip to content

part11e: 11.18 discord-webhook-notify@v2 only support discord official link #4142

@asp8964

Description

@asp8964

I've noticed that in exercise-11-18, we recommend Discord Webhook Notify. However, the project itself advises: "Don't use any v1.x.x as these have been broken by various changes over time and will no longer work properly."

For v2, the project has added a new dependency on discord.js and uses its parseWebhookURL function to parse URLs. However, this function only supports official Discord URLs that match the regex /https?:\/\/(?:ptb\.|canary\.)?discord\.com\/api(?:\/v\d{1,2})?\/webhooks\/(?<id>\d{17,19})\/(?<token>[\w-]{68})/i. This means URLs wrapped by other domains will result in the error: The provided webhook URL is not valid.

Given these issues, I suggest updating our recommendation to either Discord for GitHub Actions(based on Docker) or Actions Status Discord(pure JavaScript). Both I’ve tested —they work well and boast over 200 stars.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions