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

[SourceForge] Added badges for SourceForge #9078

Merged
merged 12 commits into from
Apr 17, 2023

Conversation

Av32000
Copy link
Contributor

@Av32000 Av32000 commented Apr 12, 2023

Hi !
In order to answer issue #8741 I added badges for the SourceForge service:

  • last-commit
  • commit-count
  • languages
  • contributors
  • translations
  • platform

Close #8741

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2023

Messages
📖 ✨ Thanks for your contribution to Shields, @Av32000!

Generated by 🚫 dangerJS against f2412ab

@Av32000 Av32000 changed the title [SourceForge] Ajout de badges pour Added badges for SourceForge [SourceForge] Added badges for SourceForge Apr 12, 2023
@Av32000
Copy link
Contributor Author

Av32000 commented Apr 13, 2023

I don't understand why some tests don't pass. There are no very explicit error messages.

@chris48s
Copy link
Member

chris48s commented Apr 16, 2023

You can run the core tests locally with npm test
You should also be able to see a summary of test failures at https://github.com/badges/shields/actions/runs/4708566389?pr=9078
but basically the issue is that the classes for all the different badges are called SourceForge. They need to have unique names.

@Av32000
Copy link
Contributor Author

Av32000 commented Apr 16, 2023

Oh good!
Effectively the problem came from the class names, it's now solved!

@github-actions
Copy link
Contributor

🚀 Updated review app: https://pr-9078-badges-shields.fly.dev

Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This looks in pretty decent shape. I've left a few comments but none of it is major

services/sourceforge/sourceforge-commit-count.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-languages.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-last-commit.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-platform.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-translations.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-languages.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-translations.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-commit-count.service.js Outdated Show resolved Hide resolved
services/sourceforge/sourceforge-last-commit.service.js Outdated Show resolved Hide resolved
@chris48s chris48s added the service-badge New or updated service badge label Apr 17, 2023
@Av32000
Copy link
Contributor Author

Av32000 commented Apr 17, 2023

I added the missing required() and metric() functions and centralized the fetch in BaseSourceForgeService.
For last-commit which was not very clear I corrected my code because I was using a method of the api which was outdated.
Everything is now up to date and working!

@Av32000 Av32000 requested a review from chris48s April 17, 2023 17:54
@github-actions
Copy link
Contributor

🚀 Updated review app: https://pr-9078-badges-shields.fly.dev

Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for contributing

@repo-ranger repo-ranger bot merged commit c2998a2 into badges:master Apr 17, 2023
@Av32000 Av32000 deleted the sourceforge branch April 17, 2023 19:34
@MarcoRavich
Copy link

MarcoRavich commented Apr 19, 2023

Thanks for the implementation, but how to generate badges ?

Only few of them are - actually - available @ Shields.io...

note: license badge would be useful for SourceForge too.

@chris48s
Copy link
Member

They are live now. I merged the PR but I hadn't got round to running a deploy immediately

@Av32000
Copy link
Contributor Author

Av32000 commented Apr 19, 2023

Hi @forart , I just tested and the merge is now active in the API. You can use https://img.shields.io/sourceforge/BADGE_TYPE/PROJECT_NAME to generate your badges.

Replace BADGE_TYPE by languages, last-commit...

@brondsem
Copy link
Contributor

This unfortunately has broken existing URLs like https://img.shields.io/sourceforge/dw/xampp.svg without a /BADGE_TYPE/ which have been around for many years, showing download counts. Any possibility of keeping those working ?

@wh201906
Copy link

I made a PR #9101 to add the old API back. Hopefully it will keep the old URLs working

@chris48s
Copy link
Member

chris48s commented Apr 20, 2023

Changing the endpoints for the existing downloads badges was not intentional. This was my oversight. I should have caught this in review.

@chris48s
Copy link
Member

Fix is deployed. Caches should clear in the next few mins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] Standard badges for Sourcefoge
5 participants