Skip to content

Instantly share code, notes, and snippets.

@GammaGames
Last active August 12, 2019 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GammaGames/3741b6886e898422a5447a1f55cbce78 to your computer and use it in GitHub Desktop.
Save GammaGames/3741b6886e898422a5447a1f55cbce78 to your computer and use it in GitHub Desktop.
Get the latest release and assets for a github repo from a static javascript page
let username = "";
let repo = "";
window.onload = () => {
fetch(`https://api.github.com/repos/${username}/${repo}/releases/latest`).then(response => {
response.json().then(json => {
console.log(json);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment