-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…23032) Backport #23010. Fix #23000. The bug was introduced in #22633, and it seems that it has been noticed: #22633 (comment) . However, #22633 did nothing wrong, the logic should be "check if they is admin only when `force` is true". So we should provide the `ForceMerge` when merging from UI. After this, an admin can also send a normal merge request with `ForceMerge` false. So it fixes a potential bug: if the admin doesn't want to do a force merge, they just see the green "Merge" button and click it. At the same time, the status of the PR changed, and it shouldn't be merged now, so the admin could send an unexpected force merge. In addition, I updated `ForceMerge *bool` to `ForceMerge bool`, I don't see the reason to use a pointer. And fixed the logic of CheckPullMergable to handle auto merge and force merge correctly.
- Loading branch information
Showing
6 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters