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. |
| 39 | 39 | | review (approve etc.) | yes | yes | yes | |
| 40 | 40 | | resolve a thread | yes | yes | yes | |
| 41 | 41 | | comment on a diff line | yes | yes | yes | |
| 42 | | suggest a change | yes | yes | no | |
| 43 | | apply a suggestion | yes | yes | no | |
| 42 | 44 | | merge (all strategies) | yes | yes | yes | |
| 43 | 45 | | merge when ready, cancel | yes | yes | no | |
| 44 | 46 | | close | yes | yes | yes | |
| @@ -480,6 +482,12 @@ now a page waiting to be built rather than a rule. A credential still |
| 480 | 482 | travels on stdin wherever it is set, since argv is world-readable in |
| 481 | 483 | /proc and the audit log keeps flag values. |
| 482 | 484 | |
| 485 | Applying a suggestion on a repository that requires signed commits is |
| 486 | CLI-only by mechanism: the server has no key to sign the commit with, |
| 487 | so =gitbay mr apply-suggestion= makes and signs it in a clone with the |
| 488 | user's own git signing configuration and pushes it. The web shows that |
| 489 | command in place of the button. |
| 490 | |
| 483 | 491 | Deleting or transferring a repository stays CLI-only on purpose, as |
| 484 | 492 | does deleting an organization and pruning merge request heads (=admin |
| 485 | 493 | mr 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 |
| 566 | 566 | anchors; =mr show= reports the unresolved count. Resolving is for the |
| 567 | 567 | thread author, the MR author, or anyone with write. |
| 568 | 568 | |
| 569 | A thread can span lines: =--start-line 12 --line 13= anchors it to |
| 570 | lines 12 and 13 of the new file. A fenced =suggestion= block in the |
| 571 | comment proposes replacement lines for that range; an empty block |
| 572 | proposes deleting it. |
| 573 | |
| 574 | #+begin_src sh |
| 575 | gitbay mr diff-comment 4 --path main.go --start-line 12 --line 13 --file - < suggestion.md |
| 576 | gitbay mr apply-suggestion 4 9 # commit thread 9's suggestion |
| 577 | #+end_src |
| 578 | |
| 579 | where =suggestion.md= is |
| 580 | |
| 581 | #+begin_example |
| 582 | one call does both |
| 583 | ```suggestion |
| 584 | log.Printf("starting %s", name) |
| 585 | ``` |
| 586 | #+end_example |
| 587 | |
| 588 | The page and =mr threads= show a suggestion as the lines it replaces |
| 589 | and the lines it proposes; =mr threads --json= carries it as |
| 590 | =suggestion= with the path, the line range, the commit and blob it was |
| 591 | made against, the original and replacement text, =outdated= with a |
| 592 | reason, and =apply= (=server= or =local=). A suggestion is outdated |
| 593 | once the lines it replaces differ at the head from what it was made |
| 594 | against, or the file is renamed or deleted; it cannot be applied then. |
| 595 | |
| 596 | Applying commits the replacement to the source branch as the applying |
| 597 | user, with a message naming the merge request and thread, and resolves |
| 598 | the thread if the applier could resolve it by hand (the thread author, |
| 599 | the MR author, or a writer of the target); otherwise the thread stays |
| 600 | open and the output says so. It is a push: only the source branch's |
| 601 | writers can apply (for a merge request from a fork, the fork's |
| 602 | writers), the branch's protection, =require-mr= and the owner's storage |
| 603 | quota apply, and a queued merge treats it as a push by the applier. The web's Apply suggestion button and =mr |
| 604 | apply-suggestion= commit it on the server. The server cannot sign, so |
| 605 | where the source or target requires signed commits (=apply= is |
| 606 | =local=) the CLI fetches the source branch into the clone it runs in, |
| 607 | builds the commit without touching the working tree, signs it with |
| 608 | =git commit-tree -S= under your git signing configuration, pushes it, |
| 609 | and resolves the thread; the page shows that command. |
| 610 | |
| 569 | 611 | * CI builds |
| 570 | 612 | |
| 571 | 613 | A =.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. |
| 12 | 12 | layout puts old and new side by side, each column's line numbers |
| 13 | 13 | comment on their own side, and a narrow window stacks the rows as a |
| 14 | 14 | 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). |
| 15 | 29 | |
| 16 | 30 | * v1.38.0 — 2026-09-29 |
| 17 | 31 | |