Pull DetailView: Show more pull informations #271

Merged
6543 merged 7 commits from 6543/tea:enhance-pullDetailView into master 2020-12-08 04:06:06 +00:00
Owner

close #258

close #258
6543 added 1 commit 2020-12-06 22:46:12 +00:00
Pull Detailview: add head/base-branch, reviews, mergable info
All checks were successful
continuous-integration/drone/pr Build is passing
3467819ce7
6543 added the
kind
enhancement
label 2020-12-06 22:46:43 +00:00
6543 added this to the v0.6.0 milestone 2020-12-06 22:46:49 +00:00
6543 added 1 commit 2020-12-06 22:46:55 +00:00
Merge branch 'master' into enhance-pullDetailView
All checks were successful
continuous-integration/drone/pr Build is passing
113c826f85
Author
Owner

demo:

demo: ![](https://gitea.com/attachments/15eb4257-0792-431a-a72f-854d307e95db)
khmarbaise reviewed 2020-12-06 22:58:11 +00:00
Dismissed
cmd/pulls.go Outdated
@ -51,3 +53,3 @@
}
print.PullDetails(pr)
reviews, _, _ := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{})
Member

Just a question:

reviews, _, _ := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{})

This does ignore the returned error from ListPullReviews if I correctly understand that.. so
shouldn't that be changed to populate the error back to the caller? What is here the general
approach in Go? like the following?

reviews, _, err := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{})
if err != nil {
	return err
}

Or do I misunderstand a thing here?

Just a question: ``` reviews, _, _ := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{}) ``` This does ignore the returned error from ListPullReviews if I correctly understand that.. so shouldn't that be changed to populate the error back to the caller? What is here the general approach in Go? like the following? ``` reviews, _, err := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{}) if err != nil { return err } ``` Or do I misunderstand a thing here?
Author
Owner

yes it just ignore an error ... since this api is realy new and wont work on old instances

yes it just ignore an error ... since this api is realy new and wont work on old instances
Member

Ok. Just wanted to know because my knowledge in Go is very limited. Thanks for your explanation.

Ok. Just wanted to know because my knowledge in Go is very limited. Thanks for your explanation.
Member

Maybe put that explanation in a code comment for future reference ;)

Maybe put that explanation in a code comment for future reference ;)
Author
Owner

It now print a error info in the corner bevore the pull detail view is shown ...

It now print a error info in the corner bevore the pull detail view is shown ...
noerw marked this conversation as resolved
noerw reviewed 2020-12-06 23:04:03 +00:00
Dismissed
@ -24,0 +50,4 @@
}
}
if pr.State == gitea.StateOpen && pr.Mergeable {
Member

This check should also verify that the minum amount of reviews are approved, to be in line with the web ui (eg this PR currently shows READY TO MERGE.)

Or is pr.Mergeable about git conflicts? In that case you should print No Conflicts instead

This check should also verify that the minum amount of reviews are approved, to be in line with the web ui (eg this PR currently shows `READY TO MERGE`.) Or is `pr.Mergeable` about git conflicts? In that case you should print `No Conflicts` instead
Author
Owner

-> https://github.com/go-gitea/gitea/issues/13879

and yes I think it's a good idear to only show NoConflicts at the moment

-> https://github.com/go-gitea/gitea/issues/13879 and yes I think it's a good idear to only show NoConflicts at the moment
6543 marked this conversation as resolved
6543 added 2 commits 2020-12-06 23:28:23 +00:00
No Conflicts
All checks were successful
continuous-integration/drone/pr Build is passing
1da4c5b636
noerw approved these changes 2020-12-06 23:36:34 +00:00
Dismissed
noerw added the
status/needs-reviews
label 2020-12-06 23:36:49 +00:00
6543 added 1 commit 2020-12-07 12:33:23 +00:00
Merge branch 'master' into enhance-pullDetailView
All checks were successful
continuous-integration/drone/pr Build is passing
3297734ff3
6543 added 1 commit 2020-12-07 14:15:19 +00:00
Merge branch 'master' into enhance-pullDetailView
All checks were successful
continuous-integration/drone/pr Build is passing
b6269a89dd
6543 added 1 commit 2020-12-08 01:21:27 +00:00
Merge branch 'master' into enhance-pullDetailView
All checks were successful
continuous-integration/drone/pr Build is passing
5ca1bec1a5
lunny approved these changes 2020-12-08 03:59:25 +00:00
Dismissed
6543 merged commit 2b11f408fd into master 2020-12-08 04:06:06 +00:00
6543 deleted branch enhance-pullDetailView 2020-12-08 04:06:12 +00:00
6543 removed the
status/needs-reviews
label 2020-12-08 12:03:35 +00:00
Sign in to join this conversation.
No description provided.