import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://xxxxx.atlassian.net/rest/dev-status/latest/issue/detail?issueId=xxxxx&applicationType=bitbucket&dataType=repository"
auth = HTTPBasicAuth("email", "api_token")
headers = {
"Accept": "application/json"
}
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
d_myjson = json.loads(response.text)
num_repo = len(d_myjson['detail'][0]['repositories'])
num_commits = len(d_myjson['detail'][0]['repositories'][0]['commits'])
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.