-
Notifications
You must be signed in to change notification settings - Fork 47
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
Allow packages from sources other than GitHub #422
Comments
For Sourcehut you can get users and rendered README in one fell swoop through their GraphQL API (schema). query {
repositoryByName(name: "purescript-web-page-visibility") {
name
readme
owner { id }
description
}
user(username: "toastal") { id username }
} Which returns something like {
"data": {
"repositoryByName": {
"name": "purescript-web-page-visibility",
"readme": "$ESCAPED_README_AS_HTML",
"description": "Type definitions and low level interface implementations for W3C Page Visibility API",
"owner": {
"id": 11755
}
},
"user": {
"id": 11755,
"username": "toastal"
}
} Querying through cURL is something like $ oauth_token=your oauth token
$ curl \
--oauth2-bearer "$oauth_token" \
-H 'Content-Type: application/json' \
-d '{"query": "{ version { major, minor, patch } }"}' \
https://meta.sr.ht/query with full documentation. If I was more familiar with Haskell (and by that I mean getting tooling set up and working), I would work on this. |
Rather than maintaining numerous integrations, I’d rather have Pursuit know as little as possible about the various code hosting services there are. In particular I would rather move in the direction of having the JSON upload contain Markdown which will be rendered by Pursuit itself instead of using APIs to render readmes. See #150 (comment) |
Oh, I wouldn't disagree, but now you definitely need to have your own sanitizer. One of my quibbles with GitHub's Markdown renderer, is that it removes One thing I appreciate about Sourcehut is that through their GraphQL API, you can |
Yes, we already have a sanitiser, for rendering the markdown in doc-comments. The problem with allowing people to bring their own renderer is that you then have to account for any kind of dodgy HTML they might produce. We can already sanitise markdown, but sanitising HTML is harder. |
Then will you bring a Markdown flavor that supports tables, abbreviations, admonitions, imports, and more out-of-the-box features? That's my biggest concern more than syntax A vs syntax B. |
No - this is just for the package’s readme on Pursuit. If you need all those things, I’d suggest setting up a separate documentation site. |
Ah, that is reasonable 🖖 (this said, abbreviation support I think is a good accessibility feature) |
Moving over here from purescript/registry#15, which mentions that the only problems of allowing packages to be published from sources other than GitHub come from Pursuit relying on GitHub for some things. Quoting from there:
The text was updated successfully, but these errors were encountered: