librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.1k stars 206 forks source link

Return Early if Github Manifest Content API Response is an Array #3312

Closed mikeyoung85 closed 4 months ago

mikeyoung85 commented 4 months ago

I'm not entirely sure what is causing this issue. The API endpoint will return either a single file or an array of files depending on if the path sent in is a single file or a directory. We are calling this endpoint to read the content of manifest files in a repository, but some paths are being interpreted as directories instead. We see a lot of errors pop up where we are trying to read the content of an array, so this PR would just skip those files since we can't get the content from it and we were assuming it was going to return a single file.