-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for source code archives #52
Comments
Hi! Looking at the GitHub API response we should be able to include source code archives from releases without any problems. Maybe by default, source code should not be included? Using a flag like
I'm not sure about this, so for now let's just implement for the GH releases. |
I'm not entirely opposed to the idea, but I'm not sure what gain you see from filtering those options out by default? |
Yeah, exactly what I was thinking. |
A small rant on Github as I was working on a prototype:
|
That's not good news, but let me know if you need help! I'm wondering if there is another API to just get the source code for a release? |
Tried to check this, but after redirect the results are (tealdeer example):
The API result is the same no matter if we query |
Okay, there's a lot of small but disruptive code redesign to be done around this feature, mainly around reading that content-disposition header to determine the filename (but only if the user hasn't specified one via the output flag). Might require a draft PR for more extensive discussion 🤔 |
At this point let's just use the The problem is that it seems there is no Content-Length HTTP header available. This will make the progress bar not working like you said. I don't see any other solution right now. Have you tried something else? |
I guess the progress bar cant be fixed. But for the filenames, the tarball urls are usually sth like |
I think we can just create the filenames manually: let base_name = format!("{repo}-{tag}");
let tarball_name = format!("{base_name}.tar.gz");
let zipball_name = format!("{base_name}.zip"); This is the same file names used by GitHub if you download the "Source code" asset from the web ui. |
The only problem with that is the archive name doesn't match the dir name that it is unpacked into, but I think we can live with that in the initial implementation 😁 |
Hi, I recently gained some interest in
dra
😄I was wondering if source code archives that are included in Github releases could also be supported.
Also, there are repos out there that only include release tags, but not GH releases, it would be convenient to be able to select and download source code archives for those too.
The text was updated successfully, but these errors were encountered: