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.
kaleidawave
getLatestGitHubRun
HTTP
A redirect to the most recent run of a workflow. Specify with /*user*/*repository*/*branch* and optionally ?workflow=*name* where name is a substring in the path. (else takes to latest of any run) Example: https://kaleidawave-getlatestgithubrun.web.val.run/kaleidawave/ezno/main?workflow=lines-of-code TODO Add handling for no runs etc Handling for GitHub API limits API versioning
0
g
countGithubLOCUI
HTTP
GitHub Line Counter π GitHub Line Counter , live on val.town ; Ever wondered how many lines of code are in a GitHub repo without the hassle of cloning it? Say hello to GitHub Line Counter β your friendly, web-based LOC inspector! π What It Does This simple tool fetches the GitHub repository as a ZIP file,
decompresses it on the fly (thanks to fflate π¨),
and counts the lines of code β on val.town
with an incredible bandwith and speed. Built with Vanilla JS on the frontend and
powered by val.town on the backend,
itβs lightweight, fast, and ready to use! How to Use Just paste the repo URL, hit "Count Lines," and watch the magic happen! β¨
2
pomdtr
serveGithubRepo
Script
Serve Github Repo Example Click here to preview a commit from 8 years ago. import { serveGithubRepo } from "https://esm.town/v/pomdtr/serveGithubRepo";
export default serveGithubRepo({
owner: "mkdocs",
repo: "mkdocs",
ref: "51ec734"
}); Fork this val to get your own copy, and customize the params. The first load can be a bit slow, but subsequents requests will be cached (both in your browser and on val.town) Use it from the cli deno run --allow-net https://esm.town/v/pomdtr/serveGithubRepoCli mkdocs/mkdocs --ref 51ec734
1