Skip to content

Add endpoint for fetching diverging commit counts

Igor Drozdov requested to merge id-stale-branches into master

What does this MR do?

An endpoint for fetching diverging commit counts is added. It expects a list of SHAs, which are dereferenced targets of requested branches

Example:

http://localhost:3000/root/long-branches/-/branches/diverging_counts?format=json&names[]=fix&names[]=another-branch

It returns:

{
  "fix":{
    "distance":1000
  },
  "another-branch":{
    "distance":1000
  }
}

Related issue

https://gitlab.com/gitlab-org/gitlab-ce/issues/46139

Edited by Igor Drozdov

Merge request reports