Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why is BitBucket's API so confusing compared to Github's?

fawk_mod January 28, 2020

So I'm at a super total loss. When I launch a payload from Github, they give me the total list of files or folders that have been modified, added, or removed. But when I try to launch a payload from Bitbucket, I get nothing concrete or even helpful at all. So for instance, from Github, I'd be seeing something like

 

{
"ref": "refs/heads/master",
"before": "...",
"after": "...",
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/.../gits/compare/...",
"commits": [
{
"id": "...",
"tree_id": "...",
"distinct": true,
"message": "This is a demo commit message",
"timestamp": "2018-11-27T23:28:46-06:00",
"url": "https://github.com/.../gits/commit/...",
"author": {
"name": "...",
"email": "...@users.noreply.github.com",
"username": "..."
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"username": "web-flow"
},
"added": [
"my_random_file.txt",
"another_random_file.txt",
],
"removed": [
"an_old_file.txt"
],
"modified": [
"most_recent_file.txt",
]
}
],    

 Where I can actually see the list of added, deleted, or modified files in plain text. But the payloads from Bitbucket are extremely confusing and extremely useless and aren't helpful. The payloads do provide a link to those commits. However, those hashed commits then give more links to some random page that either says "access denied, you don't have read or write permission" or just basically redirects back to the same exact JSON file you were on. And when you authenticate with an access token and an authorization bearer, it pretty much just repeats the same exact thing you were just viewing. Like that EXACT JSON file you were just viewing.

Is this any helpful way to view the exact list of files that were added, removed, or modified during that exact hashed commit? Or is it just a dead in the water kind of thing? I've already went through the whole raw commit thing. It looks like a raw email and doesn't have anything that's parse-able so that I can just get the exact files that were either added, removed, or modified. I don't want a bunch of jibberish that has no real meaning to me when I just want the list of files that were touched in the exact hashed commit history like the example JSON payload I posted above from Github.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events