Details
-
Suggestion
-
Resolution: Won't Do
Description
Hello,
since the deprecation of POST or Pull Request POST services in bitbucket is impossible to find out from the payload which files where changed with the last commits. Originally you could retrieve this information from payload commits -> files array
Example:
"files":[
{
"type":"modified",
"file":"CHANGELOG"
},
{
"type":"modified",
"file":"README.md"
}
],
Since this service is deprecated there is not an alternative way to get this data. The new repo:push payload doesn't have this information anymore nor other type of payloads.
Also there is no API equivalent call to retrieve only the file changed by the commit SHA1. Possible workaround would be to use the GET https://api.bitbucket.org/2.0/repositories/
{owner}/
{repo_slug}/diff/
{spec}API call and to parse the result looking for file changed, but it's a hacky solution.
Having a feature like that can benefit automation tools and services which trigger certain action based on the files changes. Having this data as part of the payload avoid the need of having git / git library inspecting the repository itself for this information.