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

Add a warning if a pull request has been changed while it was being reviewed on the pull request page #18028

Closed
vanous opened this issue Dec 19, 2021 · 0 comments · Fixed by #18032
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@vanous
Copy link

vanous commented Dec 19, 2021

Feature Description

When i open a PR page ( /pulls/xxxx ), it takes me some time to review the code, read comments and so on. Then, when i press "Merge" it may happen (and it did happen) that the PR submitter has changed the PR in the meanwhile and what was merged by me is not what i reviewed.

It would be good if the /pulls/xxxx page would not proceed with merging and ask for a new confirmation in case the PR has been changed while it was being reviewed.

Gitea 1.15 as deployed on Codeberg.

I did not find a relevant issue open nor closed.

Thank you

Screenshots

No response

zeripath added a commit to zeripath/gitea that referenced this issue Dec 19, 2021
It is possible that a PR head may be pushed to between the merge page being shown
and the merge button being pressed. Pass the current expected head in as a parameter
and cancel the merge if it has changed.

Fix go-gitea#18028

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the type/enhancement An improvement of existing functionality label Dec 19, 2021
@zeripath zeripath added this to the 1.16.0 milestone Dec 19, 2021
lunny pushed a commit that referenced this issue Dec 20, 2021
* Abort merge if head has been updated before pressing merge

It is possible that a PR head may be pushed to between the merge page being shown
and the merge button being pressed. Pass the current expected head in as a parameter
and cancel the merge if it has changed.

Fix #18028

Signed-off-by: Andrew Thornton <art27@cantab.net>

* adjust swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
…18032)

* Abort merge if head has been updated before pressing merge

It is possible that a PR head may be pushed to between the merge page being shown
and the merge button being pressed. Pass the current expected head in as a parameter
and cancel the merge if it has changed.

Fix go-gitea#18028

Signed-off-by: Andrew Thornton <art27@cantab.net>

* adjust swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants