Is there an API endpoint I can use to get the programming language of the repository?
No API endpoint for that yet.
Type
Support Request
Improvement
This will not be as simple.
Onedev can't detect what programming language the codebase is, only what filetypes it detects.
It would have to return something like the percentage of filetype within the repository.
This is an issue at some Github repos, because it detects filetypes, who are not indicative as programming language.
Like md files, or configuration languages. So I wouldn't blindly copy their implementation.
Doing it by hand might be enough for most use cases.
One issue is, that some languages take spots, that other languages take too: Like .fs for forth and fsharp.
We can work around those issues, and I think it will be worth it.
The issue of percentages vs single API endpoint could be solved with one API endpoint for the dominant, and one for the second dominant?
Something like this.
Is there an API endpoint I can use to get the programming language of the repository?