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.
apitman avatar
apitman
lastlogindemo
HTTP
An interactive, runnable TypeScript val by apitman
0
yawnxyz avatar
yawnxyz
selectHtml
Script
SelectHtml is a Deno-based HTML scraper that integrates AI with Cheerio and Pug. This tool allows you to fetch, clean, and manipulate HTML content from URLs, using the Cheerio library to select and clean the HTML elements, and html2pug to convert HTML into Pug templates. Deprecated; use htmlTo instead, as that one supports more formats: https://www.val.town/v/yawnxyz/htmlTo
0
opeala avatar
opeala
linkInBioTemplate
HTTP
Forked from stevekrouse/linkInBioTemplate
0
jxnblk avatar
jxnblk
JxnblkApp
Script
React components for https://val.town/v/jxnblk/dotcom – https://jxnblk.com
0
tmcw avatar
tmcw
devstats
HTTP
Developer Statistics This val lets you post statistics from your GitHub Actions runs to build charts of change over time. We do this by having a step at the end of our actions run like this: - name: devstats run: | curl -X "POST" "https://tmcw-devstats.web.val.run/" \ -H 'Authorization: Bearer ${{ secrets.DEVSTATS_TOKEN }}' \ -H 'Content-Type: application/json; charset=utf-8' \ -d $"{ \"name\": \"node_modules_kb\", \"value\": $(du -sk node_modules | awk '{print $1}') }" And setting a DEVSTATS_TOKEN value, which could be any short random value, both in Val Town environment variables and as a secret in your GitHub Actions configuration. Currently the name you attach to a statistic can be anything, and the value is expected to be a number.
4
yawnxyz avatar
yawnxyz
simpleLogin
HTTP
// Your routes go here
1
nbbaier avatar
nbbaier
submitPR
Script
Submit a PR from Val Town This val provides a (very) thin wrapper around the GH rest API methods for creating a pull request. It handles the creation of a Octokit client for you. Usage import { submitPR } from "https://esm.town/v/nbbaier/submitPR"; await submitPR(Deno.env.get("GH_REPO_TOKEN"), { owner: "nbbaier", repo: "test-ground", head: "branch_2", base: "main", title: "trying another PR", body: "cool stuff, take a look", }); Parameters The function takes two parameters: your gh access token and an object that's identical to the object submitted to the gh API. See GH's documentation for more info!
0
tambre avatar
tambre
pollVulkanRSSFeed
Cron
Polls the Vulkan specification repository for specification updates. If found, sends an email and makes a post on /r/vulkan.
0
shreyasmakes avatar
shreyasmakes
linkInBioTemplate
HTTP
Forked from stevekrouse/linkInBioTemplate
0
fil avatar
fil
beckerBarley
HTTP
Becker’s Barley trellis SSR chart with Observable Plot This chart is rendered server-side by val.town, using Observable Plot, from data loaded from the GitHub API. For a more complete example, see https://www.val.town/v/fil.earthquakes. For information on this chart, see https://observablehq.com/@observablehq/plot-barley-trellis.
6
juansebsol avatar
juansebsol
echosearch
HTTP
@jsxImportSource https://esm.sh/react
0
maxm avatar
maxm
repp
HTTP
repp
0
jahabeebs avatar
jahabeebs
safeMessageBoard
HTTP
Forked from stevekrouse/safeMessageBoard
1
theawu7 avatar
theawu7
linkInBioTemplate
HTTP
Forked from stevekrouse/linkInBioTemplate
0
spinningideas avatar
spinningideas
webpage_summarizer
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
1
yieldray avatar
yieldray
notebook
HTTP
https://yieldray-notebook.web.val.run/
0