-
Notifications
You must be signed in to change notification settings - Fork 644
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
Display extra information for packages hosted in GitHub #2925
Comments
On NuGot, are you storing these or fetching on the fly? |
Storing. When the background process indexes all the packages, it detects a github link in the project URL. It then adds a message to an azure queue. The github API is then called 3 times:
The HTML is then stored as an azure blob. The GitHub API is rate limited, so the process backs off and waits when the limit is approached. If the repo has been moved (i.e. new owner or rename), the API gives you a redirect response, so there's a little bit of nuance. I also have a list of popular packages that are on GH, but the URL isn't set to GH. There is a reasonably high percentage (can't remembre the precise number) of packages that have GH repos, so I think it's worthwhile. Happy to share this code if that helps (you could probably lift it an run it as is to create the blobs). |
@richorama do you want to start a PR. We can break it down to backend - Grab the data etc. A basic PR would help assess the cost of taking this to production. We can also probably chat with GH on perhaps allowing less rate limiting for nuget.org |
Also interested in learning when you update the readme info? Open to exploring this for NuGet.org. I guess this would need a back-end job as well? Or could we do this on front-end? (and when rate limit is reached, just have the current NuGet behaviour where we don't fetch the GitHub info)? |
Great! Would a node.js app be an acceptable starting point for the background process? It could be rewritten in c# later... Sent from my iPhone
|
I think we can probably start off of a node.js one. Perhaps we can first look at the current implementation and then look at how to light it up in NuGet.org? |
Is iframing the readme not a possibility? |
@304NotModified I don't think that would look very nice. It wouldn't help from an SEO perspective either. @maartenba I haven't given up on this, I've just be busy, and on a few wild goose chases with the bitbucket libraries I've found. I think I might just call the API directly... |
@richorama Keep us posted! I tried the current version with GitHub and think it's great so far! |
Thanks @richorama. This is pretty awesome. Some minor feedback. Disclosure, havent built this on my end, just looking at your screenshot:)
|
My take is we should show it as-is :-) (just as in the screenshot) |
I'm fan of having concise information dense info as much as possible, especially given the fact the we have around 12 lines of info on the left pane. For new items we are adding to the page, we should consider tightening it up so that you dont have to vertically scroll :) |
@jonwchu ? |
Doing something similar to what Marketplace does would be a great MVP. |
In addition to readme.md, also read changelog.md. This require that the file is following the "standard" in http://keepachangelog.com |
Consider to support other ways of associating packages with (GitHub, ...) repositories, as not all of them host their website on github pages (e.g. none of my projects/packages does). An additional field in the nuspec might be a better idea. Trying to guess this from the ProjectURL is a rather poor design. |
Wouldn't this be redundant with the release notes in the nuspec (which is typically generated form the change log on package creation - at least that's what I do)? |
@cdrnet Just to be clear, the code currently attempts to find the url to your GitHub repo, not GitHub pages. I think adding repo URL as a first class field in the nuspec is a good idea, perhaps if this field isn't present, the code could fail over to attempting to read it from the project url field, as this is already set for a good proportion of packages.
It's not guessing, it's decoding a URL and seeing if it matches a well known pattern (i.e. |
@richorama it is guessing, not decoding, since |
I see it as an alternative easyer way to view a release note. It is hard to use the Maybe add a |
That would be great! |
Just FYI, think this issue/PR will be obsolete. Saw the team is working on this: http://blog.nuget.org/20170718/NuGet-Gallery-Gets-A-Facelift.html#package-documentation-integration |
Introducing ReadMe.md support to packages is work in progress, and will be rolled our in the upcoming months. The spec is available here: https://github.com/NuGet/home/wiki/Package-README.md-support |
@maartenba it is available on NuGet.org, but not from the commandline yet. |
@ffMathy , adding markdown documentation to the package is work in progress. See this announcement: |
The ProjectURL could be parsed, and used to determine if GitHub is used to host the package's source code.
Several things could then be done:
readme.md
file from githubThese ideas are implemented on http://nugot.net
The text was updated successfully, but these errors were encountered: