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

sourcehut on sloc.xyz #410

Closed
nektro opened this issue Sep 27, 2023 · 8 comments
Closed

sourcehut on sloc.xyz #410

nektro opened this issue Sep 27, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@nektro
Copy link

nektro commented Sep 27, 2023

it would be great if the badge worked for projects hosted on https://git.sr.ht/

@boyter
Copy link
Owner

boyter commented Sep 28, 2023

@nektro got some examples of how you would expect it to work and the repos it would be pulling from?

Its not hard to do actually, just I don't think I have an account.

@boyter boyter added the enhancement New feature or request label Sep 28, 2023
@nektro
Copy link
Author

nektro commented Sep 28, 2023

i particularly wanted to add https://github.com/boyter/scc#badges-beta to the README of https://git.sr.ht/~nektro/magnolia-desktop

@nektro
Copy link
Author

nektro commented Sep 28, 2023

so i imagine the badge url would either be hardcoded to the main instance like https://sloc.xyz/git.sr.ht/~nektro/magnolia-desktop or generic over self hosted ones as well eg https://sloc.xyz/sourcehut/git.sr.ht/~nektro/magnolia-desktop

@nektro
Copy link
Author

nektro commented Sep 28, 2023

depending on how sloc.xyz is architected, the former could be ideal from a user's perspective as then it would be identical to the http git clone path and be able to support other self hosting options as well

@boyter
Copy link
Owner

boyter commented Sep 28, 2023

Yep thats how I would do it. So long as it follows the same pattern then no problem.

What does the git repo for that example you have look like though? I need to convert

https://sloc.xyz/git.sr.ht/~nektro/magnolia-desktop

to a git repo under the hood to ensure it works.... I guess I could create an account, but if you have it handy I can probably do this now.

@nektro
Copy link
Author

nektro commented Sep 28, 2023

https://git.sr.ht/~nektro/magnolia-desktop is a valid git clone url so the idea if you take the request path to sloc which in this case would be /git.sr.ht/~nektro/magnolia-desktop, trim the leading /, and prepend https://

@boyter
Copy link
Owner

boyter commented Sep 29, 2023

ah thats very easy then

@boyter
Copy link
Owner

boyter commented Nov 2, 2023

So easy in fact I totally forgot about it.

https://sloc.xyz/sr.ht/~nektro/magnolia-desktop/

Works now though.

Will also work got git.sr.ht, just in case you forget to tweak it.

https://sloc.xyz/git.sr.ht/~nektro/magnolia-desktop/

I also tweaked the README.md to have examples for each provider https://github.com/boyter/scc#a-example-for-each-supported-provider just to make things easier for everyone.

@boyter boyter closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants