diff options
author | Brecht Van Lommel <brecht@blender.org> | 2023-03-01 20:19:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 14:19:47 -0500 |
commit | 545495dcb0a4cb9d820132dde4f1127f7fe91aa4 (patch) | |
tree | a32fbede82037eedbe977e9c5ae85288f65d54b7 /templates | |
parent | 0268ee5c37b8ad733678f02bc15ec8642da62c10 (diff) | |
download | gitea-545495dcb0a4cb9d820132dde4f1127f7fe91aa4.tar.gz gitea-545495dcb0a4cb9d820132dde4f1127f7fe91aa4.zip |
Pull Requests: add button to compare force pushed commits (#22857)
To quickly see what changed without having to re-read the whole diff.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 94b46bd9f1..d2a4af9417 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -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" $}} |