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

Make manual merge autodetection optional and add manual merge as merge method #12543

Merged
merged 34 commits into from
Mar 4, 2021

Conversation

a1012112796
Copy link
Member

as title, Before this pr, we use same way with GH to check manually merge.It good, but in some special cases, misjudgments can occur. and it's hard to fix this bug. So I add option to allow repo manager block "auto check manual merge" function, Then it will have same style like gitlab(allow empty pr). and to compensate for not being able to detect the pr merge automatically, I added a manual approach.

example view:
tmpe

… way on ui

as title, Before this pr, we use same way with GH to check manually merge.
It good, but in some special cases, misjudgments can occur. and it's hard
to fix this bug. So I add option to allow repo manager block "auto check manual merge"
function, Then it will have same style like gitlab(allow empty pr). and to compensate for
not being able to detect THE PR merge automatically, I added a manual approach.

Signed-off-by: a1012112796 <1012112796@qq.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2020

Codecov Report

Merging #12543 into master will decrease coverage by 0.02%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12543      +/-   ##
==========================================
- Coverage   43.41%   43.39%   -0.03%     
==========================================
  Files         644      644              
  Lines       71246    71338      +92     
==========================================
+ Hits        30934    30957      +23     
- Misses      35298    35378      +80     
+ Partials     5014     5003      -11     
Impacted Files Coverage Δ
modules/auth/repo_form.go 42.34% <ø> (ø)
modules/structs/repo.go 54.54% <ø> (ø)
routers/repo/pull.go 33.13% <0.00%> (-0.57%) ⬇️
routers/repo/setting.go 14.80% <0.00%> (-0.05%) ⬇️
routers/api/v1/repo/pull.go 25.04% <18.75%> (-0.01%) ⬇️
services/pull/merge.go 47.92% <20.68%> (-2.22%) ⬇️
services/pull/check.go 22.14% <40.00%> (-25.55%) ⬇️
modules/git/repo_commit.go 55.00% <60.00%> (+0.09%) ⬆️
routers/repo/issue.go 37.68% <60.00%> (+0.08%) ⬆️
routers/repo/compare.go 40.90% <66.66%> (+0.35%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2cee3e...5d1b12c. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 20, 2020
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

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

Cool! I looked at keeping the automatic merge and just selecting force pushes to switch this off but actually this is much simpler.

I need to check your code but first of all some quick labelling comments:

integrations/pull_status_test.go Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
models/repo_unit.go Outdated Show resolved Hide resolved
modules/auth/repo_form.go Outdated Show resolved Hide resolved
modules/structs/repo.go Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
routers/api/v1/repo/repo.go Outdated Show resolved Hide resolved
routers/repo/compare.go Outdated Show resolved Hide resolved
routers/repo/setting.go Outdated Show resolved Hide resolved
services/pull/check.go Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
@zeripath zeripath added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Aug 22, 2020
@zeripath zeripath added this to the 1.13.0 milestone Aug 22, 2020
@zeripath zeripath changed the title Make auto check manual merge as a chooseable mod and add manual merge way on ui Make manual merge autodetection optional and add manual merge as merge method Aug 22, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 22, 2020
@zeripath
Copy link
Contributor

Ugh must have missed one somewhere. I've still approved as once the lint is fixed this should work.

@lafriks
Copy link
Member

lafriks commented Aug 23, 2020

Tests seem to fail

@stale
Copy link

stale bot commented Dec 25, 2020

This pull request 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 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Dec 25, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Dec 25, 2020
@stale stale bot removed the issue/stale label Dec 25, 2020
* master: (542 commits)
  [skip ci] Updated translations via Crowdin
  Use caddy's certmagic library for extensible/robust ACME handling (go-gitea#14177)
  Redirect on changed user and org name (go-gitea#11649)
  chore: bump minio to RELEASE.2021-01-16T02-19-44Z (go-gitea#14445)
  [skip ci] Updated translations via Crowdin
  CI: skip build steps for cron update works (go-gitea#14443)
  [skip ci] Updated licenses and gitignores
  [skip ci] Updated translations via Crowdin
  just overload to not get it by mistake again ... (go-gitea#14440)
  [skip ci] Updated translations via Crowdin
  Add link to packages in openSUSE build service (go-gitea#14439)
  Improve Description in new/ edit Project template (go-gitea#14429)
  Don't show "Reference in new issue" when issues unit is globally disabled (go-gitea#14437)
  CI: Update license & gitignore by cron (go-gitea#14419)
  Fix close/reopen with comment (go-gitea#14436)
  Add german translation guidelines (go-gitea#14283)
  [skip ci] Updated translations via Crowdin
  Fix lfs preview bug (go-gitea#14428)
  [skip ci] Updated translations via Crowdin
  Bump gsap from 3.5.1 to 3.6.0 (go-gitea#14410)
  ...
@a1012112796 a1012112796 marked this pull request as ready for review January 25, 2021 09:25
* master:
  [skip ci] Updated translations via Crowdin
  Fix bug because of duplicated join (go-gitea#14454)
  Cron job to cleanup hook_task table (go-gitea#13080)
  Fix panic 500 page rendering (go-gitea#14474)
  [skip ci] Updated translations via Crowdin
  Move macaron to chi (go-gitea#14293)
* master:
  Changelog v1.13.2 (go-gitea#14535) (go-gitea#14543)
  [skip ci] Updated translations via Crowdin
  [API] List, Check, Add & delete endpoints for repository teams (go-gitea#13630)
  [skip ci] Updated translations via Crowdin
  rm redirect (go-gitea#14534)
  Upgrade 'css-minimizer-webpack-plugin' to the latest version (go-gitea#14527)
  Set the name Mapper in migrations (go-gitea#14526)
@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 Mar 4, 2021
@techknowlogick
Copy link
Member

🚀

@techknowlogick techknowlogick merged commit a5279b7 into go-gitea:master Mar 4, 2021
@a1012112796 a1012112796 deleted the empty_pr branch March 4, 2021 07:33
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. 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.

8 participants