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.
pomdtr avatar
pomdtr
oranda
HTTP
An interactive, runnable TypeScript val by pomdtr
0
ejfox avatar
ejfox
githubactivity
HTTP
// This approach uses the GitHub API without authentication, which is subject to rate limiting.
0
gerard avatar
gerard
githubFollowing
Script
An interactive, runnable TypeScript val by gerard
0
iamwil avatar
iamwil
git_jiggy
HTTP
Forked from stevekrouse/git_jiggy
0
stevekrouse avatar
stevekrouse
githubFileChanged
Script
An interactive, runnable TypeScript val by stevekrouse
0
rchasman avatar
rchasman
githubStarred
Script
// GitHub starred repos
0
nbbaier avatar
nbbaier
valToGH_dev2
Script
Forked from nbbaier/valToGH
0
joey avatar
joey
getGithubStarsForRepo
Script
// Returns stars on Github repo
0
kennyg avatar
kennyg
githubGists
Script
An interactive, runnable TypeScript val by kennyg
0
alexmcroberts avatar
alexmcroberts
githubFollowing
Script
An interactive, runnable TypeScript val by alexmcroberts
0
pomdtr avatar
pomdtr
renderGithubReadme
Script
An interactive, runnable TypeScript val by pomdtr
0
tmcw avatar
tmcw
createGitHubContribGraph
HTTP
Forked from stevekrouse/git_jiggy
0
jswank avatar
jswank
githubRepos
Script
An interactive, runnable TypeScript val by jswank
0
enzonotario avatar
enzonotario
githubRepos
Script
An interactive, runnable TypeScript val by enzonotario
0
ramkarthik avatar
ramkarthik
staleGithubPRs
Script
An interactive, runnable TypeScript val by ramkarthik
1
nbbaier avatar
nbbaier
valToGH
Script
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 .
3