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.
createGithubIssue
stevekrouse
createGithubIssue
This helper function creates a Github Issue in the specified repo, assigned to whoever you want. It also adds it into the current milestone. We use this in @stevekrouse/renderEmails to auto-create issues when we have server restarts, in the current milestone, assigned to @maxm, our infra guy. import { createIssue } from 'https://esm.town/v/stevekrouse/createGithubIssue'; console.log( await createIssue({ title: "Test Issue", body: "This is a test issue.", repoOwner: "val-town", repoName: "val.town", assignee: "maxmcd", githubToken: Deno.env.get("GITHUB_CONTRIBUTIONS"), }), );
Script
githubFollowers
stungeye
githubFollowers
An interactive, runnable TypeScript val by stungeye
Script
githubFollowers
rym
githubFollowers
An interactive, runnable TypeScript val by rym
Script
githubStarWebhook
neverstew
githubStarWebhook
An interactive, runnable TypeScript val by neverstew
Script
githubactivitysummarizer
ejfox
githubactivitysummarizer
GitHub Activity Summarizer This val.town script fetches a user's recent GitHub activity and generates a summarized narrative overview using OpenAI's GPT model. Features Retrieves GitHub activity for a specified user from the past week Summarizes activity using OpenAI's GPT-3.5-turbo model Returns a concise, narrative summary of the user's GitHub contributions Usage Access the script via HTTP GET request: https://https://ejfox-githubactivitysummarizer.web.val.run/?username=<github_username> Replace <github_username> with the desired GitHub username like https://https://ejfox-githubactivitysummarizer.web.val.run/?username=ejfox in the past week Note Ensure you have necessary permissions and comply with GitHub's and OpenAI's terms of service when using this script.
HTTP
githubFollowers
rld
githubFollowers
An interactive, runnable TypeScript val by rld
Script
datasette
pomdtr
datasette
An interactive, runnable TypeScript val by pomdtr
HTTP
old_mkdocs
pomdtr
old_mkdocs
This val serve an old commit from the mkdocs repos
HTTP
githubUser
axel_sb
githubUser
An interactive, runnable TypeScript val by axel_sb
Script
githubUser
hultner
githubUser
An interactive, runnable TypeScript val by hultner
Script
githubEmoji
karfau
githubEmoji
Usage import {githubEmojiUrl} from "https://esm.town/v/karfau/githubEmoji"; console.log(githubEmojiUrl('+1')) //"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" or in a browser <img src="https://karfau-githubEmoji.web.val.run/+1"></img> Looks like in the preview. curl https://karfau-githubEmoji.web.val.run/+1 (prints "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" ) If the name you pass (as argument or in the request path) is not in the list, it returns The list of names can be accessed using githubEmojiNames or by calling https://karfau-githubemoji.web.val.run/names
HTTP
githubEvents
rcoady
githubEvents
An interactive, runnable TypeScript val by rcoady
Script
githubStarred
stevekrouse
githubStarred
// Cities named Brooklyn
Script
githubEvents
sdan
githubEvents
An interactive, runnable TypeScript val by sdan
Script
githubEvents
bram
githubEvents
An interactive, runnable TypeScript val by bram
Script
jsr2gh
vladimyr
jsr2gh
jsr2gh Redirect to jsr package's GitHub repository page, like vladimyr-jsr2gh.web.val.run/@luca/flag Usage https://vladimyr-jsr2gh.web.val.run/<scope>/<name> Example https://vladimyr-jsr2gh.web.val.run/@luca/flag https://vladimyr-jsr2gh.web.val.run/@std/assert
HTTP