Skip to content

Commit 1ddfe03

Browse files
Use AfterCommitId to get commit for Viewed functionality (#25529) (#25612)
Backport #25529 by @sebastian-sauer 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 #24813 Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
1 parent 24cf065 commit 1ddfe03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/diff/box.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
{{end}}
148148
{{end}}
149149
{{if $isReviewFile}}
150-
<label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.PullHeadCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
150+
<label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
151151
<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{$.locale.Tr "repo.pulls.has_viewed_file"}}
152152
</label>
153153
{{end}}

0 commit comments

Comments
 (0)