I used to call the /rest/dev-status/1.0/issue/detail?issueId=649846&applicationType=stash&dataType=repository API to get commit of issue, but if failed today and not sure why
{"errors": [{"instance": {"applicationLinkId": "634fc5c5-1fed-3a5b-8d26-6d0f161b212e","singleInstance": false,"primary": true,"baseUrl": "placeholder","name": "Stash","typeName": "Bitbucket Server","type": "stash"},"error": "unauthorized"}],"detail": []}