-
Notifications
You must be signed in to change notification settings - Fork 697
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
Use rebases instead of merge commits #10052
Conversation
While we probably want to backport this in the name of cleaning up git history for the branch, there's no particular reason to require it for the 3.12.1.0 release. |
I also like rebasing and getting rid of merge commits, but in this case it will interfere with the |
These are the |
Before you wrote:
So, we currently have two styles of merging ("merge" and "rebase") and this PR makes the style uniform ("rebase"). Are you saying that currently PRs using the "rebase" style are not handled by changelog-d properly? This is concerning... Furthermore, the "rebase" style does preserve the PR number, as you say: the number is appended to the commit message. Maybe, changelog-d can be taught to recognize this format of commit messages? |
6f8bc1b
to
f3c2a87
Compare
In fact it already can:
The only type of merge it cannot recognize is what github calls "Rebase and merge", since it doesn't contain the pr number. Unfortunately I noticed this isn't documented anywhere, I opened an issue about that. |
Why are we merging this? Didn't we agree that this breaks changelog-d? |
I removed the |
I understood "in fact it already can" as if there's no problem at all. Perhaps, I'm deeply misunderstanding what's going on. |
@ulysses4ever I think I misunderstood your comment. I thought you were asking if changelog-d had problem handling the current ways we already rebase, not the one introduced by this pr. Maybe let's clarify in the matrix room? |
I understood it the same way Artem did. Could you repeat your clarification here for the record? |
Copied from Matrix:
|
0c5bc02
to
ce5c756
Compare
Hold on, I need to edit documentation to match. Before I do so: currently, if for some reason you want to preserve the commits instead of squashing, you need to use |
ce5c756
to
6862739
Compare
Clarification: it seems to me that if a given PR has one or more commits that need to be separated, it's likely because it's questionable or might be reverted in the future. In this case, it seems to me that in that case, either the PR isn't really ready to merge or it should be split into multiple PRs. (The primary exception I can think of is when it's a workaround for another problem, that will be reverted when the actual problem is solved; see for example #9923. Even then, I think it would warrant being a separate PR rather than being embedded in a different one.) |
I don't think that's accurate. Label Regarding whether that's a legitimate merge method --- for large PRs, it helps readability if separate tasks are in separate commits, each of which compiles and, ideally, passes tests. Also, regardless of size, if a PR containes minor refactoring, re-indentation, etc., it's a good practice to commit them separately from the actual big change. I don't think it's viable to create separate PRs for minor changes to few files. OTOH, rarely anybody has time to read commits in separation, but OTOOH, after the first read of the whole diff, it's still useful to be able to focus on a specific task encapsulated in a separate commit. E.g., verify that a purported minor refactoring really did not change the behaviour. |
I was under the impression that we preferred refactors to be separate PRs, but okay. How about this? It's possible to conditionalize on number of commits, so the |
I meant the current state of this PR, not what |
Per haskell#10048 (comment) ff. In studying the Mergify documentation, I discovered the actual rules are slightly different than the ones we thought it was using, so I used the ones the documentation cited (cf. https://docs.mergify.com/workflow/actions/merge/#parameters). We now use `squash` instead of `rebase`, so the PR number is preserved for `changelog-d` to find.
6862739
to
a7eb740
Compare
I'm closing this for now. Future work: Mergify supports commit templates, which should allow addition of the PR number to rebase commits. In the meantime, the queue change to our Mergify config broke this in ways that need to be rewired anyway, so the only point of this PR is the discussion. (Ideally this could be converted to a discussion issue, but for some reason GitHub's API only allows the other direction.) |
Per #10048 (comment) ff.
In studying the Mergify documentation, I discovered the actual rules are slightly different than the ones we thought it was using, so I used the ones the documentation cited (cf.
https://docs.mergify.com/workflow/actions/merge/#parameters).
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: