Back to APIs list

Github API examples & templates

Use these vals as a playground to view and fork Github API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
getCohortRecentCommits
onemanwenttomow
getCohortRecentCommits
An interactive, runnable TypeScript val by onemanwenttomow
Script
oranda
pomdtr
oranda
An interactive, runnable TypeScript val by pomdtr
HTTP
githubFollowing
gerard
githubFollowing
An interactive, runnable TypeScript val by gerard
Script
git_jiggy
iamwil
git_jiggy
Remix of: stevekrouse/git_jiggy
HTTP
githubFileChanged
stevekrouse
githubFileChanged
An interactive, runnable TypeScript val by stevekrouse
Script
githubStarred
rchasman
githubStarred
// GitHub starred repos
Script
getGithubStarsForRepo
joey
getGithubStarsForRepo
// Returns stars on Github repo
Script
githubGists
kennyg
githubGists
An interactive, runnable TypeScript val by kennyg
Script
githubFollowing
alexmcroberts
githubFollowing
An interactive, runnable TypeScript val by alexmcroberts
Script
renderGithubReadme
pomdtr
renderGithubReadme
An interactive, runnable TypeScript val by pomdtr
Script
createGitHubContribGraph
tmcw
createGitHubContribGraph
Remix of: stevekrouse/git_jiggy
HTTP
githubRepos
jswank
githubRepos
An interactive, runnable TypeScript val by jswank
Script
githubRepos
enzonotario
githubRepos
An interactive, runnable TypeScript val by enzonotario
Script
staleGithubPRs
ramkarthik
staleGithubPRs
An interactive, runnable TypeScript val by ramkarthik
Script
valToGH
nbbaier
valToGH
valToGH A utility function for programmatically updating a GitHub repository with code retrieved from a Val. NOTE : This function currently does not change the contents of a file if it is already present. I will however be adding that functionality. Usage import { valToGH } from 'https://esm.town/v/nbbaier/valToGH'; const repo = "yourGitHubUser/yourRepo"; const val = "valUser/valName"; // or vals = ["valUser/valName1","valUser/valName2", ...] const ghToken = Deno.env.get("yourGitHubToken"); const result = await valToGH(repo, val, ghToken); console.log(result); Parameters repo : The GitHub repository in the format {user}/{repo} . val : A single repository in the format {user}/{val} . ghToken : Your GitHub token for authentication (must have write permission to the target repo) Options branch : Optional target branch. Default is main . prefix : Optional directory path prefix for each file. message : Optional commit message. Default is the current date and time in the format yyyy-MM-dd T HH:mm:ss UTC . ts : Optional flag to use a .ts extension for the committed file instead of the default .tsx .
Script
githubFollowers
JanJakes
githubFollowers
An interactive, runnable TypeScript val by JanJakes
Script