Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-gitea/gitea
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: a1012112796/gitea
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: add_pr_review_request
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 4 commits
  • 4 files changed
  • 4 contributors

Commits on Mar 20, 2020

  1. change review status icons on pr view style to github style

    * change the icon of ApproveReview pr from "eye" to "check" like github
    * change the icon of RejectReview pr from "x" to "request-change" like github
    * add "-" after "{{" which need to be one line (TODO: may be not change all)
    
    Signed-off-by: a1012112796 <[email protected]>
    a1012112796 committed Mar 20, 2020
    Copy the full SHA
    c5f54df View commit details

Commits on Mar 27, 2020

  1. Copy the full SHA
    6d32a65 View commit details

Commits on Mar 30, 2020

  1. Copy the full SHA
    1bb11a7 View commit details

Commits on Apr 3, 2020

  1. Copy the full SHA
    6b146f5 View commit details
Showing with 25 additions and 22 deletions.
  1. +3 −3 models/review.go
  2. +2 −2 models/review_test.go
  3. +4 −1 templates/repo/issue/view_content/comments.tmpl
  4. +16 −16 templates/repo/issue/view_content/pull.tmpl
6 changes: 3 additions & 3 deletions models/review.go
Original file line number Diff line number Diff line change
@@ -33,10 +33,10 @@ const (
func (rt ReviewType) Icon() string {
switch rt {
case ReviewTypeApprove:
return "eye"
return "check"
case ReviewTypeReject:
return "x"
case ReviewTypeComment, ReviewTypeUnknown:
return "request-changes"
case ReviewTypeComment:
return "comment"
default:
return "comment"
4 changes: 2 additions & 2 deletions models/review_test.go
Original file line number Diff line number Diff line change
@@ -44,8 +44,8 @@ func TestReview_LoadCodeComments(t *testing.T) {
}

func TestReviewType_Icon(t *testing.T) {
assert.Equal(t, "eye", ReviewTypeApprove.Icon())
assert.Equal(t, "x", ReviewTypeReject.Icon())
assert.Equal(t, "check", ReviewTypeApprove.Icon())
assert.Equal(t, "request-changes", ReviewTypeReject.Icon())
assert.Equal(t, "comment", ReviewTypeComment.Icon())
assert.Equal(t, "comment", ReviewTypeUnknown.Icon())
assert.Equal(t, "comment", ReviewType(4).Icon())
5 changes: 4 additions & 1 deletion templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
@@ -318,7 +318,10 @@
</div>
{{else if eq .Type 22}}
<div class="event" id="{{.HashTag}}">
<span class="issue-symbol">{{svg (printf "octicon-%s" .Review.Type.Icon) 16}}</span>
<span class="issue-symbol {{if eq .Review.Type 1}}green
{{- else if eq .Review.Type 2}}grey
{{- else if eq .Review.Type 3}}red
{{- else}}grey{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon) 16}}</span>
{{if .OriginalAuthor }}
{{else}}
<a class="ui avatar image"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
32 changes: 16 additions & 16 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<div class="ui divider"></div>
<div class="review-item">
<span class="type-icon text {{if eq .Type 1}}green
{{else if eq .Type 2}}grey
{{else if eq .Type 3}}red
{{else}}grey{{end}}">
{{- else if eq .Type 2}}grey
{{- else if eq .Type 3}}red
{{- else}}grey{{end}}">
{{svg (printf "octicon-%s" .Type.Icon) 16}}
</span>
{{if .Stale}}
@@ -40,19 +40,19 @@
{{end}}
<div class="comment merge box">
<a class="avatar text
{{if .Issue.PullRequest.HasMerged}}purple
{{else if .Issue.IsClosed}}grey
{{else if .IsPullWorkInProgress}}grey
{{else if .IsFilesConflicted}}grey
{{else if .IsPullRequestBroken}}red
{{else if .IsBlockedByApprovals}}red
{{else if .IsBlockedByRejection}}red
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
{{else if and .RequireSigned (not .WillSign)}}}red
{{else if .Issue.PullRequest.IsChecking}}yellow
{{else if .Issue.PullRequest.CanAutoMerge}}green
{{else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
{{- if .Issue.PullRequest.HasMerged}}purple
{{- else if .Issue.IsClosed}}grey
{{- else if .IsPullWorkInProgress}}grey
{{- else if .IsFilesConflicted}}grey
{{- else if .IsPullRequestBroken}}red
{{- else if .IsBlockedByApprovals}}red
{{- else if .IsBlockedByRejection}}red
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
{{- else if and .RequireSigned (not .WillSign)}}}red
{{- else if .Issue.PullRequest.IsChecking}}yellow
{{- else if .Issue.PullRequest.CanAutoMerge}}green
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
<div class="content">
{{template "repo/pulls/status" .}}
<div class="ui {{if not $.LatestCommitStatus}}top attached header{{else}}attached merge-section segment{{end}}">