Skip to main content

Module pulls

Module pulls 

Source
Expand description

Pull requests: the pulls spine index, the JSON API and the server-rendered pages.

Follows the JSS forge apiPullList, apiPullGet, apiPullCreate, apiPullComment, apiPullState, pullDiffData, pullsListPage, pullPage, pullCommitsPage, pullFilesPage and newPullPage (cited by name only). Titles, bodies and comments reuse the issue machinery: the spine keeps only ThreadPointers, the words live in the author’s pod (or in forge-hosted storage for a podless did:nostr agent), and pull numbering is separate from issue numbering (a documented JSS deviation from GitHub). Merging lives in crate::merge.

§Integration points

Structs§

MergeRecord
How a pull request was merged.
PlainLabels
The default PullLabels: names only, neutral colour.
PrExt
Pull-request runtime state carried by the service: the merge hook, the label resolver and the git capability detected at start-up.
PullEntry
One pull request’s spine entry.
PullHead
The head of a pull request: a branch of <owner>’s same-named repository.
PullIndex
The pull index of one repository.

Constants§

BODY_CAP
Largest body in bytes (JSS ISSUE_BODY_CAP).
KIND
The pulls spine kind (also the on-disk subdirectory name).
PULLS_PER_PAGE
Pull requests per list page (JSS ISSUES_PER_PAGE).
THREAD_CAP
Most thread entries per pull request (JSS THREAD_CAP).
TITLE_CAP
Longest title in characters (JSS ISSUE_TITLE_CAP).

Traits§

PullLabels
Resolve label names on a pull request to {name, color} objects.

Functions§

load_pull_index
Load a pull index (default when absent; a corrupt file is an error rather than a silent reset).
render_body_html
Render a thread body to HTML with the escape-first markdown renderer.
save_pull_index
Persist a pull index atomically.
state_str
Lowercase state name as used on the wire.