Retrieve programming language of the repository via API (OD-1218)
Andreas Wachter opened 3 years ago

Is there an API endpoint I can use to get the programming language of the repository?

  • Robin Shen commented 3 years ago

    No API endpoint for that yet.

  • Robin Shen changed fields 3 years ago
    Name Previous Value Current Value
    Type
    Support Request
    Improvement
  • Unknown commented 3 years ago

    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.

  • ShalokShalom commented 1 year ago

    Enry is a Java library that can detect the programming language of files and repositories. It's a port of GitHub's Linguist, which is widely used for language detection in repositories.

    Key features:

    Supports a wide range of programming languages
    Can analyze both individual files and entire directories
    Uses various strategies for language detection, including filename, extension, and content analysis
    Provides both accuracy and performance

    It will give the same language detection, that Github provides. That is particularly good for the project, that the OP has in mind.

  • ShalokShalom removed comment 1 year ago
issue 1/1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (5)
Reference
OD-1218
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover