Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Trigger rule is blank but get error: " webhook got matched, but didn't get triggered because the trigger rules were not satisfied " #718

Closed
vPt-King opened this issue Jan 10, 2025 · 2 comments

Comments

@vPt-King
Copy link

vPt-King commented Jan 10, 2025

Hi, i am currently using webhook version 2.8.2, centos 7, bitbucket. I have config hook.json like this:

[
  {
    "id": "webhook",
    "execute-command": "/opt/scripts/./deploy.sh",
    "command-working-directory": "/opt/scripts/",
    "pass-arguments-to-command": [],
    "response-message": "Triggered script for push on test-webhook main branch.",
    "trigger-rule": {}
  }
]

Trigger rule is blank so it should match all the condition, but i have this error when i commit to repository:

Jan 10 15:20:47 gitlab webhook[3437]: [webhook] 2025/01/10 15:20:47 [6ada3e] webhook got matched, but didn't get triggered because the trigger rules were not satisfied
Jan 10 15:20:47 gitlab webhook[3437]: [webhook] 2025/01/10 15:20:47 [6ada3e] 200 | 30 B | 176.201µs | 192.168.50.34:9000 | POST /hooks/webhook
Jan 10 15:26:22 gitlab webhook[3437]: [webhook] 2025/01/10 15:26:22 [4473fd] incoming HTTP POST request from 10.0.251.11:37522
Jan 10 15:26:22 gitlab webhook[3437]: [webhook] 2025/01/10 15:26:22 [4473fd] webhook got matched
Jan 10 15:26:22 gitlab webhook[3437]: [webhook] 2025/01/10 15:26:22 [4473fd] webhook got matched, but didn't get triggered because the trigger rules were not satisfied
Jan 10 15:26:22 gitlab webhook[3437]: [webhook] 2025/01/10 15:26:22 [4473fd] 200 | 30 B | 140.317µs | 192.168.50.34:9000 | POST /hooks/webhook
Jan 10 15:30:20 gitlab webhook[3437]: [webhook] 2025/01/10 15:30:20 [6ace84] incoming HTTP POST request from 10.0.251.11:37576
Jan 10 15:30:20 gitlab webhook[3437]: [webhook] 2025/01/10 15:30:20 [6ace84] webhook got matched
Jan 10 15:30:20 gitlab webhook[3437]: [webhook] 2025/01/10 15:30:20 [6ace84] webhook got matched, but didn't get triggered because the trigger rules were not satisfied
Jan 10 15:30:20 gitlab webhook[3437]: [webhook] 2025/01/10 15:30:20 [6ace84] 200 | 30 B | 126.311µs | 192.168.50.34:9000 | POST /hooks/webhook

Thanks for your help

@adnanh
Copy link
Owner

adnanh commented Jan 11, 2025

Weird, that's a bug definitely. In the meantime just remove the declaration :)

adnanh added a commit that referenced this issue Jan 11, 2025
adnanh added a commit that referenced this issue Jan 11, 2025
@vPt-King
Copy link
Author

Thanks, remove the declaration fixed the issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants