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
PullLabels: how label names on a pull request resolve to{name, color}; the labels tier installs its own withForgeService::with_pull_labels.PUT pulls/<n>/labelsis served throughForgeService::put_item_labels.render_body_html: renders thread bodies with the crate’s escape-first markdown renderer.crate::merge::TipRecorder: the anchoring hook called after a merge.
Structs§
- Merge
Record - How a pull request was merged.
- Plain
Labels - 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.
- Pull
Entry - One pull request’s spine entry.
- Pull
Head - The head of a pull request: a branch of
<owner>’s same-named repository. - Pull
Index - The pull index of one repository.
Constants§
- BODY_
CAP - Largest body in bytes (JSS
ISSUE_BODY_CAP). - KIND
- The
pullsspine 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§
- Pull
Labels - 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.