Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Has the webhook json body been changed?

Tom Fenwick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2019

Has the webhook json body been changed?

I have a jenkins job that was triggered via webhooks and jenkins receiving the hook using  https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin. Was the request body changed? It is currently broken looking for `username`  it was working as of (May 30, 2019 3:44:18 PM PST). It is now broken and i can say for sure the plugin hasn't been changed.

```
net.sf.json.JSONException: JSONObject["username"] not found.
at net.sf.json.JSONObject.getString(JSONObject.java:2040)
at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processWebhookPayload(BitbucketPayloadProcessor.java:46)
```

its looking inside the actor portion of the json body for `username` this is the actor portion of the request body (edited to remove identifying details)

```json
"actor": {
"display_name": "My display name",
"account_id": "827348723487263487",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/....."
},
"html": {
"href": "https://bitbucket.org/...../"
},
"avatar": {
"href": "https://avatar-cdn.atlassian.com/......"
}
},
"nickname": "my nickname",
"type": "user",
"uuid": "{some uuid here}"
}
```

Also I am unable to find any release notes about bitbucket cloud and i am unable to find the version of the bitbucket cloud i am currently using.

1 answer

1 accepted

1 vote
Answer accepted
Tom Fenwick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2019

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events