Skip to content

Commit 901b87f

Browse files
committed
fix: check for Github hostname instead of string includes
1 parent c90bad8 commit 901b87f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/webhooks-trigger.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ const WebhooksTrigger = ({tool}: WebhooksTriggerConfig): ReactElement => {
9797
if (webhook.url) {
9898
setTriggeringWebhook(webhook._id)
9999

100-
const isGithubAction = webhook.url.includes('github.com')
100+
const hostname = new URL(webhook.url).hostname
101+
const isGithubAction = hostname === 'github.com' || hostname.endsWith('.github.com')
101102

102103
try {
103104
const response = await fetch(webhook.url, {

0 commit comments

Comments
 (0)