aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorsebastian-sauer <sauer.sebastian@gmail.com>2023-06-30 18:08:18 +0200
committerGitHub <noreply@github.com>2023-07-01 00:08:18 +0800
commited8a8af99f125cebc8291e510d61511f8e56b04f (patch)
tree7bceec9e47d0f83ea56be68efdfea07158f31223 /templates/repo/diff
parent65acd1e9ef9eda01fd9b07a72abafa2d7bf83435 (diff)
downloadgitea-ed8a8af99f125cebc8291e510d61511f8e56b04f.tar.gz
gitea-ed8a8af99f125cebc8291e510d61511f8e56b04f.zip
Use AfterCommitId to get commit for Viewed functionality (#25529)
the PullHeadCommitID is not always available when the PR is merged. Not sure if this is the best solution but in my simple tests it looks like this fixes the problem - happy to get any feedback. hopefully fixes https://github.com/go-gitea/gitea/issues/24813
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/box.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 1198452f7e..8f570e5efc 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -147,7 +147,7 @@
{{end}}
{{end}}
{{if $isReviewFile}}
- <label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.PullHeadCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
+ <label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{$.locale.Tr "repo.pulls.has_viewed_file"}}
</label>
{{end}}