Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codeberg: Server 500 Errors #38

Closed
maltfield opened this issue Mar 6, 2024 · 6 comments · Fixed by #39
Closed

Codeberg: Server 500 Errors #38

maltfield opened this issue Mar 6, 2024 · 6 comments · Fixed by #39

Comments

@maltfield
Copy link

maltfield commented Mar 6, 2024

There appears to be an error when trying to generate badges for codeberg repos.

For example, loading the following URLs give 500: Internal Server Error:

  1. https://badgers.space/codeberg/release/rimu/pyfedi
  2. https://badgers.space/codeberg/release/Kbin/kbin-core
  3. https://badgers.space/codeberg/release/noisytoot/matt
  4. https://badgers.space/codeberg/release/ac/punycode
  5. etc
@SplittyDev
Copy link
Owner

Thanks a lot for reporting this! I'm not super familiar with the Codeberg API, but for some reason, I'm getting a status code 403 Forbidden when sending the API requests..

Interestingly, this works fine:

I'm thinking that the Codeberg API returns 403 Forbidden when a repository doesn't have any releases, which indeed seems to be the case for the repos you mentioned. I'll try to make the error handling more resilient.

@maltfield
Copy link
Author

maltfield commented Mar 7, 2024

Ah, that makes sense.

I was submitting a PR to to an "awesome table" that had a column for "number of stars" badges. Previously the table only had repos on GitHub, so I decided to try SpaceBadgers for a new item that's on Codeberg.

I only chose "/release" because "/stars" wasn't available, and it seemed better than nothing

I assume it's currently not possible to get a "number of stars" badge from codeberg with badgers.space?

@SplittyDev
Copy link
Owner

I fixed the release endpoint in #39, gonna merge it soon.
Looking at the API docs, it should be totally possible to expose a star badge.. I'll get back to you in a few minutes

@SplittyDev
Copy link
Owner

Both the fix and a new stars endpoint are online as of now 🚀

https://badgers.space/codeberg/stars/forgejo/forgejo

https://badgers.space/codeberg/release/ac/punycode

maltfield added a commit to maltfield/Clone-Wars that referenced this issue Mar 7, 2024
@SplittyDev
Copy link
Owner

@all-contributors please add @maltfield for bugs and ideas

Copy link
Contributor

@SplittyDev

I've put up a pull request to add @maltfield! 🎉

EliasLeguizamon123 pushed a commit to GorvGoyl/Clone-Wars that referenced this issue Mar 7, 2024
* Add federated (ActivityPub) twitter & reddit alternatives

 * Mastodon
 * Lemmy
 * kbin
 * Sublinks
 * PieFed

See Also:

 * #226
 * #225

* + Mastodon uses ActivityPub

* there is no badge provider for codeberg stars

* update codeberg badges from "release" to "stars"

 * SplittyDev/spacebadgers#38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants