diff options
author | David Svantesson <davidsvantesson@gmail.com> | 2020-01-09 02:47:45 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2020-01-09 01:47:45 +0000 |
commit | 25531c71a78b98af91f25d5e6eaa362e5fc54a86 (patch) | |
tree | 3dc44abba51f55f66020755d31fa909a9c56990e /templates/repo/diff | |
parent | 5b2d9333f1d06a15f11906b39c4867cc5d1c9448 (diff) | |
download | gitea-25531c71a78b98af91f25d5e6eaa362e5fc54a86.tar.gz gitea-25531c71a78b98af91f25d5e6eaa362e5fc54a86.zip |
Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)
Fix #5997.
If a push causes the patch/diff of a PR towards target branch to change, all existing reviews for the PR will be set and shown as stale.
New branch protection option to dismiss stale approvals are added.
To show that a review is not based on the latest PR changes, an hourglass is shown
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/diff/new_review.tmpl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 573e7d4638..822b1e54f6 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -4,6 +4,7 @@ {{end}} <form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.HTMLURL}}/files/reviews/comments" method="post"> {{$.root.CsrfTokenHtml}} + <input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"/> <input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}"> <input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}"> <input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}"> diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index 68d8f893f2..4981c9ef48 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -7,6 +7,7 @@ <div class="ui clearing segment"> <form class="ui form" action="{{.Link}}/reviews/submit" method="post"> {{.CsrfTokenHtml}} + <input type="hidden" name="commit_id" value="{{.AfterCommitID}}"/> <i class="ui right floated link icon close"></i> <div class="header"> {{$.i18n.Tr "repo.diff.review.header"}} |