question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement/new script request: "Github-Releases?"

See original GitHub issue

Hey Rob!

So I spent some time digging through the darned GH site code (my head hurts now) and after taking your rawlinks script as a guide (JS not my primary lang) began and fairly quickly now feeling defeated on one of those things I’ve been putting off it seems forever that seems to still be missing from any available GH enhancements out there.

From talking to others I know I’m not the only one that frequently (despite yes, using official Git) either prior to deciding to do an official local clone to work on, or simply for backup/analysis of my or some other repo, utilizing the GH web Clone or Download \ Download Zip button. Be it on different branches, etc.

So, now to where I had always felt there was room for a “wouldn’t that be cool” that over the years has become “I’m really tired of having to…” is:

  1. Clicking on the Download Zip enhanced to append the commit-tease-sha (short-sha) element text at the end of the target filename. Today, re-saving the repo only results in "Repo-master(1).zip","Repo-master(2).zip" so what an excellent idea to instead, through userscript magic, make it automatically save/suggest as "Repo-master(07f668c)","Repo-master(210f04)" since personally, that is now what I wind up having to do by hand to better identify the downloaded version(s).
    This itself introduces a challenge I had not considered until diving in - when you look at the HREF the zip is named based on the branch (master.zip/develop.zip/etc.) however is really only a fallback because the header returned hands the browser (if it’s listening) the Content-Disposition: attachment header at which time the browser suggests/defaults to in GH case: <reponame>-<branchname>.zip. This is why if you do a standard wget or curl you get master-zip, and if you open Chrome and click you get Repo-master.zip. So, there is that challenge to deal with and I have seen decent examples of utilizing the header in XMLHttpRequest(), but still hitting a brick wall at the design phase as to the best approach.

  2. Clicking on the same Download Zip also enhanced to appending 3 new list elements below the (hopefully enhanced) ZIP file download button. Perform an API lookahead (this is where the rawlinks I thought could be helpful since I eventually realized it needs to do basically the exact same thing you did there but in repo/releases) to the releases page, pull UP TO the first three (3) most recent (let’s say strictly the ZIP files for simplicity). I did come up with nice jquery code right before it occurred I should instead be using the API and I had totally wasted my time 😦.

I really really cannot believe nobody has written even just the releases one since the binary releases are so commonly downloaded and most are only interested in the more current and want to perhaps see the comparison to the prior release for possible rollback. If this is perhaps something you would ever want to work on I will certainly share the (apparently little) I have determined (I have narrowed down I believe some of the key element selector/paths etc.). I just recall when we discussed the rawlinks how fast you churned that out, and being that much of these two enhancements (I think) is already just perhaps a regurgitation/rework of that same script maybe you’d look and think this would be just as easy for you. 😃

TIA!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
Mottiecommented, Oct 22, 2018
0reactions
Mottiecommented, May 5, 2019

Finally added!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically generated release notes - GitHub Docs
Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a...
Read more >
Release Drafter · Actions · GitHub Marketplace
Drafts your next release notes as pull requests are merged into master. Built with Probot. Usage. You can use the Release Drafter GitHub...
Read more >
Enhance documentation for Kotlin gradle build scripts #281
Can you show or state how I can make this plugin works using a kotlin build script (build.gradle.kts)? Just to be sure: this...
Read more >
Managing releases in a repository - GitHub Docs
Creating a release · On GitHub.com, navigate to the main page of the repository. · To the right of the list of files,...
Read more >
Update release script to support pre-releases #5583 - GitHub
Description of Problem: If you want to tag a pre-release the release script does not accept, for example, the version number 1.10.0a1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found