Hey. I'm new to both BitBucket and to git, and I'm struggling. I've got a simple POST service I'm trying to setup based on this code: (walk-through: http://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories & code: https://gist.github.com/krisnoble/4692643)
It's not firing, and I've managed to work out why - the data in the $_POST variable isn't being accessed correctly. I've setup a `mail` function to email me the output and when I run `implode(',', $_POST)` and output the data, I get this in return:
{\"repository\": {\"website\": \"\", \"fork\": false, \"name\": \"test\", \"scm\": \"git\", \"owner\": \"me\", \"absolute_url\": \"/me/test/\", \"slug\": \"test\", \"is_private\": true}, \"user\": \"me\", \"truncated\": false, \"commits\": [{\"node\": \"5347dd04bbfd\", \"files\": [{\"type\": \"modified\", \"file\": \"index.html\"}], \"branch\": \"master\", \"utctimestamp\": \"2013-05-25 01:11:41+00:00\", \"timestamp\": \"2013-05-25 03:11:41\", \"raw_node\": \"5347dd04bbfd7c63e380985a5878dd3f34275994\", \"message\": \"testing remote push\\n\", \"size\": -1, \"author\": \"me\", \"parents\": [\"56eda188f077\"], \"raw_author\": \"My Name <me@xxx.com>\", \"revision\": null}], \"canon_url\": \"https://bitbucket.org\"}
This doesn't look right and it also means that when i try to access $_POST['payload'] or any other variable combo, it's coming up empty.
What am I doing wrong??
Hi Tiffani,
Have you emailed the owner of that github repo? Looks like he responds to posts on the blog.
Mary
thanks for replying. I have emailed him with nothing back yet. I thought I'd ask here, as the question really didn't involve the code that was being questioned. I put the email and output at the very beginning of the code, so that the first thing that happens is the output to email and the $_POST data isn't coming through like i'd expect. I can't figure out how to get the POST data out into a usable format. The problem is actually separate to the rest of the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.