Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show review summary in pull requests #5132

Merged
merged 37 commits into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b555fd3
Added basic function to get reviewers with their review statuses by i…
kolaente Oct 20, 2018
c58a61c
Reviewers are now shown in the ui
kolaente Oct 20, 2018
5b10388
Fixed review time
kolaente Oct 20, 2018
ea1626e
add il8n
kolaente Oct 20, 2018
e5062e4
Merge branch 'master' into feature/review-summary
kolaente Oct 20, 2018
ce094e1
Only show reject and approve pr comments in summary
kolaente Oct 20, 2018
45f061a
Only show newest pr comments in summary
kolaente Oct 20, 2018
ab6657f
fixed sorting
kolaente Oct 20, 2018
2146c92
Fixed heatmap in postgresql
kolaente Oct 21, 2018
34419ba
Merge branch 'master' into feature/review-summary
kolaente Oct 21, 2018
6813ed0
Merge remote-tracking branch 'origin/feature/review-summary' into fea…
kolaente Oct 21, 2018
c54539f
Dont show reviewers when there are none
kolaente Oct 21, 2018
a9589fa
Also show review comments in summary
kolaente Oct 21, 2018
d60cb21
ui enhancements
kolaente Oct 21, 2018
99ff14c
Merge branch 'master' into feature/review-summary
kolaente Oct 21, 2018
67d3eb6
Added tests
kolaente Oct 21, 2018
ce9a329
Re-added filtering out review comments in summary
kolaente Oct 21, 2018
7b48594
merge
kolaente Oct 23, 2018
9465aac
generate css
kolaente Oct 23, 2018
be62e24
Fixed tests
kolaente Oct 23, 2018
06403bc
Merge branch 'master' into feature/review-summary
kolaente Oct 25, 2018
83b1f97
Merge branch 'master' into feature/review-summary
kolaente Oct 25, 2018
c71d4a3
Merge branch 'master' into feature/review-summary
kolaente Oct 26, 2018
82a20ca
fix typo
kolaente Oct 28, 2018
3a53bf8
Put reviews in fixtures for testing
kolaente Oct 28, 2018
d9925bd
Merge remote-tracking branch 'origin/feature/review-summary' into fea…
kolaente Oct 28, 2018
c6465b3
Merge branch 'master' into feature/review-summary
kolaente Oct 28, 2018
154bafe
Merge branch 'master' into feature/review-summary
kolaente Oct 29, 2018
966b373
Merge branch 'master' into feature/review-summary
kolaente Oct 29, 2018
784e560
Fixed failing on more verbose databases than sqlite
kolaente Oct 29, 2018
9ea420c
Merge branch 'master' into feature/review-summary
kolaente Oct 31, 2018
e0afa5f
Merge branch 'master' into feature/review-summary
kolaente Oct 31, 2018
159535c
Merge branch 'master' into feature/review-summary
kolaente Nov 5, 2018
a61912d
Merge branch 'master' into feature/review-summary
kolaente Nov 9, 2018
72cc73f
Merge branch 'master' into feature/review-summary
kolaente Nov 21, 2018
cedad28
Return a slice instead of a map
kolaente Nov 21, 2018
246626f
fixed tests
kolaente Nov 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed review time
  • Loading branch information
kolaente committed Oct 20, 2018
commit 5b10388641399ba53c3af685498a436c985844f9
9 changes: 6 additions & 3 deletions models/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,16 @@ func UpdateReview(r *Review) error {
return nil
}

// PullReviewersWithType represents the type used to display a review overview
type PullReviewersWithType struct {
User `xorm:"extends"`
Type ReviewType
User `xorm:"extends"`
Type ReviewType
ReviewUpdatedUnix util.TimeStamp `xorm:"review_updated_unix"`
}

// GetReviewersByPullID gets all reviewers for a pull request with the statuses
func GetReviewersByPullID(pullID int64) (issueReviewers []*PullReviewersWithType, err error) {
err = x.Select("`user`.*, review.type, review.updated_unix").
err = x.Select("`user`.*, review.type, review.updated_unix as review_updated_unix").
Table("review").
Join("INNER", "user", "review.reviewer_id = `user`.id").
Where("review.issue_id = ?", pullID).
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h4>Reviewers</h4>
<div class="ui divider"></div>
{{range .PullReviewersWithType}}
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
{{ $createdStr:= TimeSinceUnix .ReviewUpdatedUnix $.Lang }}
<div class="review-item">
<span class="type-icon text {{if eq .Type 1}}green
{{else if eq .Type 2}}grey
Expand Down