SplittyDev / spacebadgers

Fast and clean SVG badges
https://badgers.space
MIT License
252 stars 4 forks source link

Add Codeberg endpoints #36

Closed tranzystorekk closed 8 months ago

tranzystorekk commented 8 months ago

Hi, I discovered spacebadgers some time ago and really liked it!

Was looking at existing endpoints and thought I could contribute a Codeberg one. The changes in this PR are heavily inspired by #14 but if there are any remarks I'll gladly apply them.

Gitea/Forgejo don't seem to track a contributor list or repo license yet, so I didn't include an endpoint for those.

vercel[bot] commented 8 months ago

@tranzystorekk is attempting to deploy a commit to the splittydev's Team Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spacebadgers ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2024 4:34pm
SplittyDev commented 8 months ago

Awesome, thanks!

I'll have to figure out how to obtain a Codeberg access token for the env before I can merge this.. Will test again once I have a working one!

tranzystorekk commented 8 months ago

I'll have to figure out how to obtain a Codeberg access token for the env before I can merge this..

You can generate a token from a codeberg account via Settings -> Applications; don't forget to expand the "Select permissions" section and mark at least repository as Read

SplittyDev commented 8 months ago

Alright, I've added a Codeberg token to the preview env, let's see if everything works after redeploying

SplittyDev commented 8 months ago

@tranzystorekk for some reason the issues endpoints all show None for forgejo, even though they do have active open as well as closed issues. The release endpoint works correctly.

tranzystorekk commented 8 months ago

Ah right, the issues have their own access token permission, issue

SplittyDev commented 8 months ago

Ah right, the issues have their own access token permission, issue

Awesome, works now! Do you wanna change anything or shall I merge?

tranzystorekk commented 8 months ago

I'll quickly simplify the needless code in buildUrl and then it's good to go!

tranzystorekk commented 8 months ago

OK, done! Thank you for engaging with me! 😊

SplittyDev commented 8 months ago

OK, done! Thank you for engaging with me! 😊

Thanks a lot for contributing this code! 🚀

SplittyDev commented 8 months ago

@all-contributors please add @tranzystorekk for code

allcontributors[bot] commented 8 months ago

@SplittyDev

I've put up a pull request to add @tranzystorekk! :tada: