1
0
Fork 0
forked from forgejo/forgejo

Pull Requests: add button to compare force pushed commits (#22857)

To quickly see what changed without having to re-read the whole diff.
This commit is contained in:
Brecht Van Lommel 2023-03-01 20:19:47 +01:00 committed by GitHub
parent 0268ee5c37
commit 545495dcb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View file

@ -707,6 +707,11 @@
{{$.locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}}
{{end}}
</span>
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
<span class="ui float right comparebox">
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{$.locale.Tr "repo.issues.force_push_compare"}}</a>
</span>
{{end}}
</div>
{{if not .IsForcePush}}
{{template "repo/commits_list_small" dict "comment" . "root" $}}