aboutcode icon indicating copy to clipboard operation
aboutcode copied to clipboard

Missing license information for repositories due to unrecognized license filename

Open chinyeungli opened this issue 8 months ago • 11 comments

Projects under aboutcode-org are lacking license information in the 'About' section. In addition, the github API responses do not provide license details (e.g., license: null) For instance, https://api.github.com/repos/aboutcode-org/purldb https://api.github.com/repos/aboutcode-org/scancode-toolkit

This happens because GitHub does not recognize apache-2.0.LICENSE as a valid license file. It only looks for files named LICENSE, LICENSE.md etc. Since the project repositories don't have these files, GitHub is unable to detect the license.

chinyeungli avatar Apr 16 '25 12:04 chinyeungli

@chinyeungli I’ve submitted a PR that resolves this issue by renaming the license file to LICENSE so GitHub can properly detect it:

👉 #204

This should update the license info in both the "About" section and the GitHub API response.

Let me know if anything else needs to be adjusted! Thanks!

LuciferVid avatar Jul 13 '25 10:07 LuciferVid

@LuciferVid what about fixing GitHub license detection instead?

pombredanne avatar Jul 15 '25 16:07 pombredanne

@pombredanne hey! just to clarify, this pr is actually meant to fix github’s license detection.

the original repo uses a file named apache-2.0.LICENSE, which github doesn’t recognize, so it ends up showing no license in the about section and returns "license": null in the api.

i renamed it to just LICENSE, which github detects properly. after that change, it now shows apache-2.0 in the about section and also includes the license info in the api response.

attaching both screenshots for reference:

  • original repo – no license detected (license: null in api, nothing in about section):
Image Image
  • my fork – license detected correctly:
Image

let me know if anything else needs to be tweaked or if you'd want the same fix on other repos too.

thanks!

LuciferVid avatar Jul 15 '25 18:07 LuciferVid

@LuciferVid Thanks for the effort. I think what @pombredanne meant is that instead of renaming the current license file from apache-2.0.LICENSE to LICENSE, we should explore ways to request github to adjust its license detection behavior.

chinyeungli avatar Jul 15 '25 22:07 chinyeungli

@chinyeungli got it, makes sense. i thought it might be a simple fix from the repo side, but yeah if the naming is intentional across projects then reaching out to github’s side sounds fair.

happy to help with any other cleanup or fixes if needed — and thanks for the context!

LuciferVid avatar Jul 16 '25 05:07 LuciferVid

@chinyeungli is this issue still open , Can I contribute to it ?

CodeMaverick-143 avatar Oct 01 '25 07:10 CodeMaverick-143

@CodeMaverick-143 well u can fellow colleague but they dont want the renaming solution they want to request github to adjust its license detection behavior.

LuciferVid avatar Oct 01 '25 07:10 LuciferVid

@LuciferVid Ok

CodeMaverick-143 avatar Oct 01 '25 07:10 CodeMaverick-143

@LuciferVid Yes. Thanks for the clarification.

chinyeungli avatar Oct 01 '25 07:10 chinyeungli

@chinyeungli is this issue still open? can i have any chance to contribute here?

vanshika2424agr avatar Dec 14 '25 06:12 vanshika2424agr

@vanshika2424agr Thanks for your interest. I’ve already submitted a request to GitHub to update their license detection behavior (https://github.com/orgs/community/discussions/181937), since we don’t want to rely on the renaming approach (see the comments above). At this point, I don’t think there’s anything else that needs to be done.

chinyeungli avatar Dec 14 '25 23:12 chinyeungli