• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
nbbaier

nbbaier

submitPR

Public
Like
submitPR
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
2/25/2024
Viewing readonly version of main branch: v45
View latest version
README.md

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

Create val
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!

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.