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

Creator of pull request can chose to start review when commenting but never submit them #7289

Closed
2 of 7 tasks
themightychris opened this issue Jun 25, 2019 · 16 comments
Closed
2 of 7 tasks

Comments

@themightychris
Copy link

Description

If you create a pull request and then go to comment within that pull request, you're offered the option to just add a comment or start a review. If you start a review, every comment you post after that becomes part of the review and is held in a "Pending" status. But then you can't submit the review because you created the pull request and your comments can never be posted.

At the very least, if submitting a review is not an option then "start review" should not be an option when commenting. Ideally though, any admin or whitelisted review should be able to submit a review even if they created the pull request. I know this behavior was copied from GitHub per #4728 but its problematic: being the creator of a pull request does not mean you're the author of all/any of the commits within it. At the least it should be a branch option whether whitelisted reviewers can review their own pull requests. My use case is that I open develop->master pull requests for each release as the maintainer of the project and want to then review the release. It seems entirely common that maintainers on small teams might open the pull requests for others' pushed branches to create a review context, it seems silly that it should need to be a rule that maintainers wait for people to open their own PR in order to be able to start reviewing a branch

Screenshots

image

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 25, 2019
@jamesfancy
Copy link

So, how to finish the review?

@lunny
Copy link
Member

lunny commented Jul 17, 2019

One should not review himself PR.

@themightychris
Copy link
Author

@lunny Gitea's job isn't to force some notion of best practice for teams by having a broken UI

Also I explained in the original post two use cases where it does make sense to be reviewing a PR you created

@lunny
Copy link
Member

lunny commented Jul 17, 2019

Maybe this could be a config item to allow user approval/reject himself PR on protected branch and default false.

@themightychris
Copy link
Author

themightychris commented Jul 17, 2019

Maybe, but this issue is about the UI getting into an unresolvable state by it's own invitation

If there resolution though is going to be Gitea trying to enforce any opinions about team workflow through its UI though I would say it needs to be an option

@lunny
Copy link
Member

lunny commented Jul 18, 2019

OKay. I think pull request creator should not be allowed to click start review button. This should be a bug.

image

@lunny lunny added type/bug and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jul 18, 2019
@gary-kim
Copy link
Member

gary-kim commented Jul 18, 2019

I would argue there are definite use cases for having the author be able to review their own pull requests. Most of them being covered in the first post of the issue. The person who opened the pull request is not always the person who made the most changes. Pull requests are sometimes opened as a "should we merge this?" or even "let's get this to a workable" rather than "let's merge this" so being able to review a pull request even if you authored it so, for example, if someone else has made a change after you opened the pull request, you can review their changes.

In any case, if the author cannot review their own pull request, following that line of thinking, shouldn't anyone who authored or committed to the branch should not be able to review the pull request? But, depending on the workflow of the organization, it is possible everyone has had some part in contributing to a branch that is going to be merged in meaning noone can review the pull request.

Essentially, the pull request author is not necessarily in a better or worse position then anyone else to be reviewing the pull request.

Maybe opening the pull request is an approval in an of itself but it also often isn't.

For now, there should be a fix for the pull request button but maybe we should create another issue for allowing pull request authors to review the pull request.

@lunny
Copy link
Member

lunny commented Jul 18, 2019

@gary-kim see my comment #7289 (comment)

@stale
Copy link

stale bot commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Sep 16, 2019
@themightychris
Copy link
Author

There is still a bug here that is pretty serious and has a pretty simple solution: prevent someone from starting a review if they're not going to be allowed to submit it. Without this fix, PRs can be taken into a stuck state via the UI that they can't be recovered from

@stale stale bot removed the issue/stale label Sep 16, 2019
@lafriks
Copy link
Member

lafriks commented Sep 23, 2019

You should be able to start review and in review dialog "Comment" button should be allowed

@zeripath
Copy link
Contributor

@lafriks that's the current situation.

@lafriks
Copy link
Member

lafriks commented Oct 11, 2019

Yes and I don't see a problem with that

@guillep2k
Copy link
Member

OK, I couldn't reproduce the problem

I've just tested on my dev server (1.10.0+dev-411-g0e90b506c, 633cd7f).

The steps I did were:

  • Log in, create a PR from the UI.
  • Go to the code review tab.
  • Select a line of code.
  • Enter a message, click "Start Review".
  • The comment is created, but marked as "Pending".
  • Click the "Review" button, the "submit review" dialog shows up.
  • The "Comment" button is kinda dim, but I press it.
  • My review is added no problem.

Here's a snapshot of the "submit review" dialog:
image

Testing with my production 1.9.4 gave me the exact same results. Adding more than one comment before submitting worked fine too.

So, perhaps it's just a styling issue.

@stale
Copy link

stale bot commented Dec 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Dec 10, 2019
@stale
Copy link

stale bot commented Dec 24, 2019

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Dec 24, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants