Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6.3k
Add Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge#3188
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 Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge #3188
Uh oh!
There was an error while loading. Please reload this page.
Conversation
lafriks commented Dec 13, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
codecov-io commented Dec 13, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #3188 +/- ## ========================================== + Coverage 34.62% 34.86% +0.24% ========================================== Files 277 278 +1 Lines 40298 40506 +208 ========================================== + Hits 13952 14122 +170 - Misses 24298 24299 +1 - Partials 2048 2085 +37
Continue to review full report at Codecov.
|
lunny left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe splited two PRs for quick review.
models/migrations/v54.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need sess.Begin()
lafriks commented Dec 13, 2017
@lunny how do you mean to split them? |
lafriks commented Dec 13, 2017
@lunny fixed |
ethantkoenig commented Dec 14, 2017
Fair and early notice: please add tests (at some point, I understand it's a WIP right now) |
ethantkoenig commented Dec 17, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@lafriks When I do a squash, the author of the squashed commit is Perhaps we should include authorship check in our tests? |
lafriks commented Dec 17, 2017
@ethantkoenig when squashing author is set as PR poster (as theoretically there could be multiple commit authors) |
ethantkoenig commented Dec 17, 2017
@lafriks |
ethantkoenig commented Dec 17, 2017
Tried again, same thing happened. Let me know if you aren't able to reproduce |
lafriks commented Dec 17, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@ethantkoenig it is same as currently with merge commit. It uses So you have probably set for user to keep email address private. |
ethantkoenig commented Dec 17, 2017
You're right, good catch |
lafriks commented Dec 17, 2017
I'm out of ideas how to preserve commit info in PR when merged with squash or rebase :( As there is no merge commit to reference. Especially for squash merge as original commits are lost completely when PR head branch is deleted. |
lafriks commented Dec 17, 2017
Looks like github does that by keeping commit info in |
lafriks commented Dec 17, 2017
I think it is ready for review now, please test it and comment :) |
lafriks commented Dec 17, 2017
Automatically adding all commit messages to extended commit message for squash should be implemented as other PR to not make this PR even bigger |
aab0620 to f53d612Compare
ethantkoenig left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, mostly nits
integrations/pull_merge_test.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use models.MergeStyle
models/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This check is unnecessary, pr.LoadIssue() already does it
models/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe MergeStyleMerge would be better?
options/locale/locale_en-US.ini Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request can not be merged as no merge options are enabled.
routers/api/v1/repo/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This is check unnecessary, since pr.Merge already checks the provided mergeStyle.
models/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use .GetUnit(..), so we don't unnecessarily ignore an error.
options/locale/locale_en-US.ini Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Pull Request -> pull request
options/locale/locale_en-US.ini Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: whitespaces -> whitespace
models/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr.HeadRepo may not always loaded, I think that is why CI is failing.
integrations/pull_merge_test.go Outdated
ethantkoenigDec 18, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not too hard, could we check that the merge itself was successful, (that a commit was created, that correct merge style was used, etc.)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lafriks Is this doable?
models/pull.go Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not the right place, but shouldn't this functionality be moved to the "git" module ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably that would be better place but as it was there already that should be done in other PR
03bfe37 to 60b2092Comparelafriks commented Dec 31, 2017
@ethantkoenig can I merge? as now approvals also count as LG-TM :) |
ethantkoenig commented Dec 31, 2017
lafriks commented Dec 31, 2017
@ethantkoenig oh, ok will add that next year :)) |
lunny commented Jan 1, 2018
@lafriks is there one still waiting a change? |
lafriks commented Jan 1, 2018
@lunny yes @ethantkoenig wants more tests |
lunny commented Jan 5, 2018
@lafriks@ethantkoenig I think we can merge this and @lafriks could take another PR to add tests. |
ethantkoenig commented Jan 5, 2018
okay |
lafriks commented Jan 5, 2018
@lunny@ethantkoenig ok, I will improve tests in other PR |
When visiting a repos `/settings/units` page, highlight the active tab properly: "Add more..." if the tab is displayed, or "Settings" otherwise. Fixesgo-gitea#3188. Signed-off-by: Gergely Nagy <[email protected]> (cherry picked from commit 65ed86e)
Fixes#712
Add Pull Request merge options:
Tasks:
Fix wrong display of merged PR commits and changes- should be implemented as separate PR (issue Keep merged PR info in hidden branch #3222)Screenshots:
