I've been trying to script out 'posting a comment' to PR's in my repo as the final stage in our testing workflow.
Here's the cURL command I'm using:
curl -H "Content-Type: application/json" \
-X POST \
-d '{"content": {"raw": "sample text"}}' \
'https://api.bitbucket.org/2.0/repositories/{my_username}/{my_repo_slug}/pullrequests/1/comments'
Unfortunately, I've been getting a 500 server error returned from this:
{"type": "error", "error": {"message": "Something went wrong", "id": "108609ba088f47e98f70a1b119088765"}}
For test purposes, my repo is public so there are no authentication issues at all.
Am I missing anything? I have attempted a similar thing using the deprecated 1.0 API and got the same error.
Link to API documentation
Threads I've looked at so far
FYI - I don't think I have enough reputation to reply more than every 24h so please give me an alternative way to respond to you.
Update
This is now working fine. It looks like the 500 Server Error was indeed a problem on the server-side.
Does anyone know what might have caused it / how frequently these issues should be anticipated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.