Offer one commit upstream
A fork's writer can send a single commit of the fork to its parent as a pull.
On the web
Open a commit on your fork (/<you>/<fork>/commit/<oid>) and press Offer upstream. The
button shows only to someone who can write to a fork. The forge cuts the branch offer/<first 12
hex of the commit> in the fork at that commit, opens a pull on the parent from it, and sends you
to the offer's receipt (below). The pull's title is the commit's subject; its body names the fork and the commit and
says what the fork's check made of it: passed, failed, still running, superseded, or none ran.
The form works without JavaScript. The address must carry the full commit id: anything else answers 404 before git is asked.
In the terminal
Open the commit in the history screen (enter on a log row) of a fork and press o. The toast
names the pull (owner/name#N) or says why not. The pull opens through the same action as the
page, so anyone watching the parent's pulls on the web sees it appear.
The palette's Offers upstream (any signed-in person) lists the receipts of what you offered
from your forks, newest first, in the page's words: the state, the reason of a decline, the
upstream, the fork, the commit and the day. j/k scroll, esc goes back. The screen is
src/tui/screens/offers.ts; it reads each receipt through readForkOffer, as the page does.
The receipt
Each offer gets a receipt at /offers/<id> (#14156): what was sent (the commit and its pull
title), to whom (the upstream) and where it stands, in four plain states read from the pull,
never stored.
| State | Meaning |
|---|---|
| sent | Nobody upstream has answered it yet. |
| seen | Someone who can write upstream has reviewed or commented on it. |
| taken | The upstream merged it. |
| declined | The upstream closed it without merging; the reason is the last comment an upstream writer left on it, when they left one. |
Only someone who can write to the upstream speaks for it: a stranger's comment on a public upstream changes neither the state nor the reason.
Only the offerer and people who can write to the upstream read it; anyone else, and an id never
given, answers 404. The id is 128 random bits, never a pull number. The words are
FORK_OFFER_WORDS in src/core/fork_offer.ts, the same on the page, in the terminal and over
MCP.
Over MCP
fork with action: "offer", repo (your fork) and a full commit id offers it and returns the
receipt; action: "receipt" with receipt reads it again.
An outsider's offer to a public repository keeps its own receipt (offer.md).
Refusals, in words
OFFER_COMMIT_WORDS in src/actions/offer_commit.ts says each: not signed in, cannot write to
the fork, not a fork, upstream archived, no such commit in the fork, already offered in an open
pull, and the upstream did not take the offer.
An upstream that does not accept outside pulls is not yet a refusal of its own; only an archived one is.
Branches
If the pull fails to open, the branch this offer cut is deleted. After a pull is closed the
offer/ branch stays in the fork, and the same commit can be offered again on it.
Offer a merged pull
On a fork's merged pull, a writer sees Offer upstream with a preview (<details>) of the title
and description that would be filed. Pressing it offers the commit the pull landed on, through
the same action as above (offerPull in src/actions/offer_pull.ts), with the pull's own
description in the body, and lands on the receipt. In the terminal, O on the pull screen does the
same (src/tui/screens/pull.ts). A fork with no upstream, an archived upstream or an unmerged
pull is refused in OFFER_PULL_WORDS. Offering again, even at the same instant, returns the first
offer's receipt and files nothing. The offered branch is the fork's history up to that commit.