The Google Cloud Shell gives you a handy and quick Shell access to your Cloud instance. One thing you may not know is that you can use the Cloud Shell to clone and edit a Github project. Let's see how.
The trick here is to just call the following URL: https://console.cloud.google.com/cloudshell/open
with the following parameters:
git_repo
: this is the URL to your github repositoryopen_in_editor
: this would be the file you want to open in the editorpage=editor
: this tells the cloud shell to open the code editor
We could for instance have the following URL: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/manekinekko/actions-on-google-i18n&page=editor&open_in_editor=index.js
.
Now, all you have to do is to add this URL to a HTML anchor element <a> href="..."</a>
. Here is an example:
How would I do this with private repo?