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

Auto merge pull requests when all checks succeeded via WebUI #19648

Merged
merged 42 commits into from
Jun 11, 2022

Conversation

6543
Copy link
Member

@6543 6543 commented May 7, 2022

taken from #9307, they where removed to get the feature in ...
close #19621

TODO:

  • backend
  • frontend

Screenshot from 2022-05-20 03-37-10
Screenshot from 2022-05-20 03-37-34
Screenshot from 2022-05-20 03-41-22

@6543 6543 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. topic/ui Change the appearance of the Gitea UI labels May 7, 2022
@6543

This comment was marked as outdated.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 7, 2022
routers/web/repo/pull.go Outdated Show resolved Hide resolved
@wxiaoguang wxiaoguang changed the title (Discontinued) Auto merge pull requests when all checks succeeded via WebUI - Available for Adoption (Pending) Auto merge pull requests when all checks succeeded via WebUI - Available for Adoption May 8, 2022
@Gusted Gusted added this to the 1.17.0 milestone May 8, 2022
@6543 6543 added the pr/wip This PR is not ready for review label May 12, 2022
@6543

This comment was marked as outdated.

@wxiaoguang

This comment was marked as duplicate.

@wxiaoguang wxiaoguang changed the title (Pending) Auto merge pull requests when all checks succeeded via WebUI - Available for Adoption (WIP) Auto merge pull requests when all checks succeeded via WebUI - Available for Adoption May 18, 2022
@6543

This comment was marked as outdated.

@6543 6543 marked this pull request as ready for review May 18, 2022 11:32
@wxiaoguang

This comment was marked as outdated.

@6543

This comment was marked as resolved.

@wxiaoguang

This comment was marked as resolved.

@6543
Copy link
Member Author

6543 commented May 19, 2022

well I think, we should not have to document it
it should be self explaining, by the UI to only show options that are posible...

  • any user can create a pull to a repo as long as it's visibe to them
  • codeWrite permission allow you to merge beside protected branch is protecting from merging
  • auto-merge can be scheduled/cancled by codeWrite permission
  • admins & owners can merge (with red button) with bypassing protected branch rules - but also are able to schedule/cancle auto-merge

(code already describe it that way but UI does not ...)

@wxiaoguang
Copy link
Contributor

well I think, we should not have to document it

However, if I am a frontend developer, how can I read a lot of backend code to understand how it works ...... even if the backend code might become incorrect during refactoring .....

@lunny
Copy link
Member

lunny commented Jun 3, 2022

I also think the UI/UX may make somebody confusing. I suggest we have more discuss about that. And I think the auto merge should also require the base branch is updated?

Please propose non-confusing UI/UX

First, How about to make the state machine

graph TD;
      A[Manual Merge] --> B[Auto Merge];
      B --> C[Cancel Merge];
      C --> A;
Loading

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 3, 2022

I do not think that an admin should have to cancel an scheduled auto merge before they do a normal merge. The admin should be able to bypass the checks and scheduled auto merge, then do the normal merge in one click.

But if you prefer to change the logic, there is no blocker from my side, edit on this PR directly.

@lunny
Copy link
Member

lunny commented Jun 3, 2022

I do not think that an admin should have to cancel an scheduled auto merge before they do a normal merge. The admin should be able to bypass the checks and scheduled auto merge, then do the normal merge in one click.

But if you prefer to change the logic, there is no blocker from my side, edit on this PR directly.

You are right. Admin should not be blocked by that. But I think that's what the complicated thing. We have to put both manually merge and auto merge in the UI in that situation and have to have a lock between manual merge and auto merge. To avoid that, we can simplify the process.

I'm not sure if this is the right direction. Just my thought and more ideas are welcome.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 8, 2022

About this PR, I think it should either:

  • get merged in 1.17 and be improved later.
  • (OR) get improved before 1.17-rc and get merged in 1.17

Otherwise these already merged backend code and translations would become dead code and might be more difficult to be maintained in the future.

@techknowlogick techknowlogick modified the milestones: 1.17.0, 1.18.0 Jun 8, 2022
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 8, 2022

@techknowlogick Do you prefer to move it to 1.18? Can you help me to know the reasons? already discussed in discord. wait for some design feedbacks.

@wxiaoguang wxiaoguang modified the milestones: 1.18.0, 1.17.0 Jun 9, 2022
@wxiaoguang
Copy link
Contributor

Some UI adjustments (shorten the texts)

image

@lunny
Copy link
Member

lunny commented Jun 10, 2022

I think the merge style should be decided when starting to auto merge. The change of merge style should not be allowed before cancel the auto merge.

Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it.
Seems to work now as intended (apart from the small translation issue).
Let's keep improving the UI for another PR and get this merged for 1.17.

web_src/js/components/PullRequestMergeForm.vue Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 11, 2022
@6543
Copy link
Member Author

6543 commented Jun 11, 2022

🚀

@6543 6543 merged commit a9cc9c0 into go-gitea:main Jun 11, 2022
@6543 6543 deleted the auto-merge_webUI branch June 11, 2022 14:44
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 12, 2022
* giteaoffical/main:
  Fix signal loop in graceful manager (go-gitea#19943)
  Prettify number of issues (go-gitea#17760)
  Improve file header on mobile (go-gitea#19945)
  Unify repo settings & show better error (go-gitea#19828)
  [skip ci] Updated translations via Crowdin
  fixed comment typo (go-gitea#19944)
  Auto merge pull requests when all checks succeeded via WebUI (go-gitea#19648)
  Fix some mirror bugs (go-gitea#18649)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
…a#19648)

Add WebUI part of Auto merge feature

close go-gitea#19621

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto merge pull requests when all checks succeeded via WebUI
8 participants