feat(pulls): support per-commit review (#39326)

Opening a single commit of a PR let you look, but not review. The Review
button was disabled and there was no way to reach the next or previous
commit. This finishes https://github.com/go-gitea/gitea/pull/37475,
which only reached the head commit.

- Reviews can be submitted from a single commit, a commit range stays
disabled
- A bar above a single-commit diff shows the commit, its position in the
PR and prev/next buttons
- The commit dropdown marks the commits on screen
- Timeline commits open the PR's commit view, commits force-pushed out
of the PR redirect to the repository commit page

Assisted-by: Claude Code (Fable 5.1)
Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
authored and GitHub committed 2026-10-30 20:18:13 +00:00
1 parent cbb563b080
commit fa41fc94d4
12 files changed
+155 -35

No files matched your search

+6 -1
View File
@@ -32,7 +32,11 @@
color: var(--color-text);
}
.ui.button.hover-opaque:hover {
.ui.ui.ui.buttons.hover-opaque {
background: var(--color-body)
}
.ui.ui.ui.button.hover-opaque:hover {
/* ".ui.button:hover" uses alpha channel to "highlight", it doesn't work when the background is not body: the inherited color is not right
for such case, use this opaque color */
background: var(--color-hover-opaque);
@@ -282,6 +286,7 @@
font-size: 0;
vertical-align: baseline;
margin: 0 0.25em 0 0;
border-radius: var(--border-radius);
}
/* btn is a plain button without any opinionated styling, it only uses flex for vertical alignment like ".ui.button" in base.css */