Expand description
The forge consumer’s domain (ADR 0029, spec/forge.md).
What a pull request or merge request is to a review, the forge’s review threads as the review sees them, and the two decisions that sit between a forge and the reader’s findings: where a fetched thread lands in the diff, and which findings a publish may send.
Nothing here runs a program. The adapters that speak to gh and glab
implement Forge and live in forgeio; this module is the trait, the
types it speaks in, and pure policy over a plan document.
Structs§
- Batch
- What one publish sends: everything in one submission where the forge allows it.
- Excluded
- A finding a publish left out, and why, in words for the status line.
- LineEnd
- One end of a multi-line comment, as GitLab’s
line_rangenames it. - Line
Span - The two ends of a multi-line comment’s
line_range. - NewComment
- A new review comment to publish: a finding that is not a reply.
- NewReply
- A reply to publish into an existing thread.
- OwnComment
- A comment on the forge that is the reader’s: by author, by marker, or by
the address a publish recorded. What the reviewer’s
cedits anddddeletes;ReviewSession::own_commentis the one place that decides it. - Publish
Outcome - What one publish brings back: the forge’s record of each finding it took, and the threads fetched afterwards so the twins can be shown.
- Publish
Plan - A publish, decided: what goes and what stays.
- Published
- One comment the forge accepted, keyed back to its finding.
- Remote
Comment - One comment in a thread.
reply_toisNoneon the root. - Remote
Thread - One review thread: where the forge put it, and where this review did.
- Request
- A request as the forge describes it: the object a review is of.
- Sent
- What an adapter’s publish brought back.
Enums§
- Forge
Error - Forge
Kind - Which forge a request lives on. The flag that names the request names
this too:
--pris GitHub and--mris GitLab, and nothing infers it.
Traits§
- Forge
- The forge, as the domain needs it.
dyn: which forge a repository is on is a run-time answer, like which model groups (ADR 0020, 0029).
Functions§
- head_
matches - Whether the forge still has the head this review was opened on. Both forges reject a comment against any other commit, so this is the first thing a publish checks and the batch is not built when it fails.
- other_
side_ line - The number an unchanged line has on the other side, or
Nonefor a changed line, which exists on one side only. - place
- Where a fetched thread lands in this plan.
- publish
- The whole publish, forge side: ask the forge where the request is now, refuse if it moved, send the batch, fetch the threads again.
- publish_
plan - Which open findings a publish may send, and which it must leave.
- source_
for - The range a request reviews: the merge base of its target branch’s tip and its head, to its head. That is the diff the request page shows.
- strip_
marker - A fetched body, split into what is shown and which finding wrote it.
- with_
marker - A finding’s body as it is sent: the text, a blank line, the marker.