Comments (20)
Can you provide more information? It sounds like it was working and then just stopped working. ? Did you update webhook? What version of webhook are you running?
from webhook.
What payload is bitbucket sending? What is the configuration of your hook in hooks.json file?
from webhook.
You should remove "parse-parameters-as-json": [ { "source": "payload", "name": "payload" } ]
from the hooks.json
and then restart webhook.
parse-parameters-as-json
property is used to parse strings
that are valid JSON. The payload bitbucket sends is not a string, it is actually an object.
from webhook.
Can you copy the exact output of the command: curl -v -X POST http://192.168.1.229:9000
from webhook.
Turns out the Bitbucket has updated the event payloads. Try replacing { "source": "payload", "name": "payload.commits.0.author" }
with { "source": "payload", "name": "actor.username" }
from webhook.
Can we add this sample config to the wiki?
from webhook.
Thanks for your answers.
hooks.json:
[ { "id": "redep-it-hook", "execute-command": "/home/it/ho/redeploy.sh", "command-working-directory": "/home/it/ho", "parse-parameters-as-json": [ { "source": "payload", "name": "payload" } ], "pass-arguments-to-command": [ { "source": "string", "name": "123" }, { "source": "payload", "name": "payload.commits.0.author" } ] } ]
BitBucket send request on push to repo.
It happened after the server is not working day. Then I re-launched webhook.
Start webhook: nohup ./webhook -hooks hooks.json -verbose -port 9000
from webhook.
Today I downloaded the latest version of webhook again, all the same.
I checked with the help of ngrok - he is also responsible 405
With what it can be connected?
from webhook.
I do the same, the exact same error.
Even if I just send your inquiry to:
curl -X POST http://192.168.1.229:9000
from webhook.
`* Rebuilt URL to: http://192.168.1.229:9000/
- Hostname was NOT found in DNS cache
- Trying 192.168.1.229...
- Connected to 192.168.1.229 (192.168.1.229) port 9000 (#0)
POST / HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.1.229:9000
Accept: /
< Content-Type: text/plain; charset=utf-8
< Date: Wed, 13 Apr 2016 09:53:53 GMT
< Content-Length: 19
<
404 page not found - Connection #0 to host 192.168.1.229 left intact
`
Replaced payload, yet all the same
from webhook.
Sorry, try hitting the actual hook: curl -v -X POST http://192.168.1.229:9000/hooks/redep-it-hook
from webhook.
`
- Hostname was NOT found in DNS cache
- Trying 192.168.1.229...
- Connected to 192.168.1.229 (192.168.1.229) port 9000 (#0)
POST /hooks/redep-it-hook HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.1.229:9000
Accept: /
< Date: Wed, 13 Apr 2016 10:00:04 GMT
< Content-Length: 80
< Content-Type: text/plain; charset=utf-8
< - Connection #0 to host 192.168.1.229 left intact
error parsing JSON: couldn't retrieve argument for {Source:payload Name:payload}
`
from webhook.
In hooks.json:
[ { "id": "redep-it-hook", "execute-command": "/home/it/ho/redeploy.sh", "command-working-directory": "/home/it/ho" } ]
from webhook.
Are you sure you restarted webhook?
from webhook.
Problem with:
"parse-parameters-as-json":
{
"source": "payload",
"name": "payload"
}
from webhook.
Yes, I asked you to remove that from your hooks.json
file. Did it work after that?
from webhook.
Yes, after remove and restart webhook
from webhook.
Awesome. :-)
from webhook.
I guess the original example is now outdated, so we should update it. Do you mind doing it?
from webhook.
Wiki updated.
from webhook.
Related Issues (20)
- Broadcasting Slack Slash Command's Response HOT 1
- Header evaluation is broken HOT 4
- Step-by-step tutorial for a 'Hello world'
- Vulnerabilities of dependency "gopkg.in/yaml.v2"
- webhook hook not running bash script HOT 6
- Bitbucket now supports webhook secrets 🥳 HOT 1
- I found that I can't use dot-notation to contain all sub-objects in my json
- I need to parse url for addr:port HOT 1
- Update `go` installation
- Ubuntu Webhooks is not reading the correct RVM ruby installed HOT 2
- Custom logging
- Webhook id is not being served in URL HOT 2
- how to set shell $PATH HOT 4
- Weird Cert issue when calling webhook from shell HOT 1
- pass-file-to-command as optional HOT 1
- Add a (unique) folder with images for dynamic responses HOT 7
- Question - How long does the webhook service run
- Add hook property to control command output logging
- New WebHook, Docker, Env Support, Clean codebase 🎉
- amd64 does not works pre compiled? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webhook.