Commit 1346335ed2

1346335ed27caab6323565ff5b7cf62d7e74084c

parent: 39ca1bd78c

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-29 05:08 UTC

wiki, changelog: suggested changes in review threads

Closes #288

Layout: unified · split

.gitbay/wiki/Parity.org +8
@@ -39,6 +39,8 @@ browser-only and the iOS build screen unable to say more than the log.
3939| review (approve etc.) | yes | yes | yes |
4040| resolve a thread | yes | yes | yes |
4141| comment on a diff line | yes | yes | yes |
42| suggest a change | yes | yes | no |
43| apply a suggestion | yes | yes | no |
4244| merge (all strategies) | yes | yes | yes |
4345| merge when ready, cancel | yes | yes | no |
4446| close | yes | yes | yes |
@@ -480,6 +482,12 @@ now a page waiting to be built rather than a rule. A credential still
480482travels on stdin wherever it is set, since argv is world-readable in
481483/proc and the audit log keeps flag values.
482484
485Applying a suggestion on a repository that requires signed commits is
486CLI-only by mechanism: the server has no key to sign the commit with,
487so =gitbay mr apply-suggestion= makes and signs it in a clone with the
488user's own git signing configuration and pushes it. The web shows that
489command in place of the button.
490
483491Deleting or transferring a repository stays CLI-only on purpose, as
484492does deleting an organization and pruning merge request heads (=admin
485493mr prune=): each removes or moves what clone URLs point at, and wants a
.gitbay/wiki/Users.org +42
@@ -566,6 +566,48 @@ Threads render inline on the MR page. A force-push marks them stale
566566anchors; =mr show= reports the unresolved count. Resolving is for the
567567thread author, the MR author, or anyone with write.
568568
569A thread can span lines: =--start-line 12 --line 13= anchors it to
570lines 12 and 13 of the new file. A fenced =suggestion= block in the
571comment proposes replacement lines for that range; an empty block
572proposes deleting it.
573
574#+begin_src sh
575gitbay mr diff-comment 4 --path main.go --start-line 12 --line 13 --file - < suggestion.md
576gitbay mr apply-suggestion 4 9 # commit thread 9's suggestion
577#+end_src
578
579where =suggestion.md= is
580
581#+begin_example
582one call does both
583```suggestion
584 log.Printf("starting %s", name)
585```
586#+end_example
587
588The page and =mr threads= show a suggestion as the lines it replaces
589and the lines it proposes; =mr threads --json= carries it as
590=suggestion= with the path, the line range, the commit and blob it was
591made against, the original and replacement text, =outdated= with a
592reason, and =apply= (=server= or =local=). A suggestion is outdated
593once the lines it replaces differ at the head from what it was made
594against, or the file is renamed or deleted; it cannot be applied then.
595
596Applying commits the replacement to the source branch as the applying
597user, with a message naming the merge request and thread, and resolves
598the thread if the applier could resolve it by hand (the thread author,
599the MR author, or a writer of the target); otherwise the thread stays
600open and the output says so. It is a push: only the source branch's
601writers can apply (for a merge request from a fork, the fork's
602writers), the branch's protection, =require-mr= and the owner's storage
603quota apply, and a queued merge treats it as a push by the applier. The web's Apply suggestion button and =mr
604apply-suggestion= commit it on the server. The server cannot sign, so
605where the source or target requires signed commits (=apply= is
606=local=) the CLI fetches the source branch into the clone it runs in,
607builds the commit without touching the working tree, signs it with
608=git commit-tree -S= under your git signing configuration, pushes it,
609and resolves the thread; the page shows that command.
610
569611* CI builds
570612
571613A =.gitbay/ci.yml= in the repo runs jobs on every branch push:
CHANGELOG.org +14
@@ -12,6 +12,20 @@ anything beyond "replace the binary and restart" is needed.
1212 layout puts old and new side by side, each column's line numbers
1313 comment on their own side, and a narrow window stacks the rows as a
1414 unified diff. Migration 0068 adds =users.diff_layout=. (#290)
15- Suggested changes in review threads: a fenced =suggestion= block in
16 an =mr diff-comment= body proposes replacement lines for the
17 anchored range, and =--start-line= anchors a thread to a range.
18 =mr threads= and the page show it as a diff, marked outdated once
19 the lines change at the head or the file is renamed or deleted;
20 the JSON carries it as =suggestion=. =mr apply-suggestion= and the
21 page's button commit it to the source branch as the applier, under
22 the branch's push policy and write rules; a queued merge sees it as
23 a push. The thread is resolved when the applier could resolve it by
24 hand, and otherwise stays open with the output saying so. On a
25 repository requiring signed commits the CLI commits and signs it in
26 the clone instead. =repo commit-file= and applying a suggestion
27 refuse once the owner's storage quota is used up, as a push does.
28 Migration 0069 (#288).
1529
1630* v1.38.0 — 2026-09-29
1731