mardi 7 janvier 2020

How to download repository in zip with github API

I am developing a web app with laravel and angularjs (I am new to both), in which when you click on a button, you must download a github repository (or clone it)

I know that if I add this "href='/:owner/:repo/archive/master.zip' to an anchor tag, it can be downloaded, but I don't want the folder named" repo-master "

I have an idea to clone the repository using exec("git clone clone_url"); and then somehow compress it and link it to the web, but I don't think it's the best solution.




Aucun commentaire:

Enregistrer un commentaire