Feature/add language in repository to api
What does this MR do?
It adds the same language statistics to the API (/projects/:id/languages) which are already in the UI (/:user/:project/graphs/master/charts)
Are there points in the code the reviewer needs to double check?
It was often ask to have it like in github, but this is not easily doable, as github does not provide percentages but the number of bytes written in a language. See github Doc.
If percentages are not enough I would be very glad to be pointed to the right place to collect the needed data. Would it be in the Gitaly/commit.pb.go?
Why was this MR needed?
It would be helpful to detect the main language of a repository with the GitLab API, like it is already in the UI of GitLab.
There is a related issue/feature-request
https://gitlab.com/gitlab-org/gitlab-ce/issues/40236
The development of this MR is sponsored by @ siemens (/cc @bufferoverflow @koffeinfrei).
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qa
manual pipeline job)