Pull DetailView: Show more pull informations #271

Merged
6543 merged 7 commits from 6543/tea:enhance-pullDetailView into master 2 years ago
6543 commented 2 years ago
Collaborator

close #258

close #258
6543 added 1 commit 2 years ago
6543 added the
kind/enhancement
label 2 years ago
6543 added this to the v0.6.0 milestone 2 years ago
6543 added 1 commit 2 years ago
113c826f85 Merge branch 'master' into enhance-pullDetailView
Poster
Collaborator

demo:

demo: ![](https://gitea.com/attachments/15eb4257-0792-431a-a72f-854d307e95db)
khmarbaise reviewed 2 years ago
Dismissed
cmd/pulls.go Outdated
}
print.PullDetails(pr)
reviews, _, _ := client.ListPullReviews(owner, repo, idx, gitea.ListPullReviewsOptions{})
Collaborator

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?
6543 commented 2 years ago
Poster
Collaborator

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
Collaborator

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.
noerw commented 2 years ago
Collaborator

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

Maybe put that explanation in a code comment for future reference ;)
6543 commented 2 years ago
Poster
Collaborator

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 2 years ago
Dismissed
}
}
if pr.State == gitea.StateOpen && pr.Mergeable {
noerw commented 2 years ago
Collaborator

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
6543 commented 2 years ago
Poster
Collaborator

-> 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 2 years ago
noerw approved these changes 2 years ago
Dismissed
noerw added the
status/needs-reviews
label 2 years ago
6543 added 1 commit 2 years ago
3297734ff3 Merge branch 'master' into enhance-pullDetailView
6543 added 1 commit 2 years ago
b6269a89dd Merge branch 'master' into enhance-pullDetailView
6543 added 1 commit 2 years ago
5ca1bec1a5 Merge branch 'master' into enhance-pullDetailView
lunny approved these changes 2 years ago
Dismissed
6543 merged commit 2b11f408fd into master 2 years ago
6543 deleted branch enhance-pullDetailView 2 years ago
6543 removed the
status/needs-reviews
label 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 2b11f408fd.
Sign in to join this conversation.
Loading…
There is no content yet.