Skip to content

Commit ed8a8af

Browse files
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 #24813
1 parent 65acd1e commit ed8a8af

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)