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

Unable to get last-commit of some projects on sourceforge. #10921

Closed
Typhonling opened this issue Mar 5, 2025 · 4 comments · Fixed by #10935
Closed

Unable to get last-commit of some projects on sourceforge. #10921

Typhonling opened this issue Mar 5, 2025 · 4 comments · Fixed by #10935
Assignees
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@Typhonling
Copy link

Are you experiencing an issue with...

shields.io

🐞 Description

Some of the projects are like:
https://sourceforge.net/projects/opencamera/
https://sourceforge.net/projects/ghostcommander/

Is it because their catalog structure is not as expected?
In the example, the catalog for guitarix is https://sourceforge.net/p/guitarix/git/ci/master/tree/ .
And in the example I gave, they were https://sourceforge.net/p/ghostcommander/svn/HEAD/tree/ & https://sourceforge.net/p/opencamera/code/ci/master/tree/ .

🔗 Link to the badge

No response

💡 Possible Solution

No response

@Typhonling Typhonling added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Mar 5, 2025
@chris48s
Copy link
Member

chris48s commented Mar 5, 2025

I'm not really sure why, but those projects don't seem to expose git data via the API.
https://sourceforge.net/rest/p/guitarix/git/commits give us data, but
https://sourceforge.net/rest/p/opencamera/git/commits is a 404
I'm not sure what the difference is

@jNullj
Copy link
Member

jNullj commented Mar 6, 2025

I think i figured this out
it looks like some projects use the default repo path and host only 1 git repo
https://sourceforge.net/rest/p/${project}/git/commits
this is what we use today for api calls.
But it looks like the API allows for one project to have multiple git repos and also change the name of the default one.
For example opencamera or mingw.
If you click on the project at the web interface you can see under git multiple repo names, API path should be as follows:
https://sourceforge.net/rest/p/${project}/${repo}/commits
where the default seems to be git but project owner can change it. for example for opencamera its code
https://sourceforge.net/rest/p/opencamera/code/commits
mingw for example has many git repos that host multiple codebases.

That tells us that we want to expose the repo as a user param with a default value git.
I don't mind updating the service over this weekend but let me know what you think about this changes first.

@Typhonling
Copy link
Author

Thank you for your work.
https://sourceforge.net/rest/p/${project}/${repo}/commits
I made some attempts at this and I think it's the correct way to get the commit history.

@chris48s
Copy link
Member

chris48s commented Mar 7, 2025

@jNullj Sounds good to me, but we need to do it in a way that provides a redirect to maintain compatibility for existing users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants