Why curl closes PRs on GitHub
daniel.haxx.se
daniel.haxx.se
It seems like Curl makes it the maintainers' job to do the rebasing and commit-style corrections. Zephyr, on the other hand, put it on the pull request's creator. I ended up force-pushing and rebasing half a dozen times because I had to learn all their rules the hard way.
I don't think either method is necessarily better than the other - it depends on the project. Zephyr's approach lets the maintainers focus on more important things than commit-style yak shaving, while curl's approach lowers the barrier to entry for inexperienced contributors.
Coming from those better systems, the review interface of Github feels like a badly implemented afterthought.
This really goes for most of GitHub's additions. Issues, releases, wiki all feel like the bare minimum needed to claim it has those features.
Depends on the person I guess but I often find it less exhausting to just fix up minor issues myself than to get a driveby contributor to adhere to the project style.
An additional problem with closing a pull request instead of "purple merging" it is that it gives off the wrong end result when you view the pull request from the pull requests view, as an activity comment in a related issue, or by viewing the top of a pull request. Red should mean change rejected and purple should mean change accepted, regardless of the mechanism by which the code was accepted.
Disclosure: I used to work at Reviewable
> Thanks! Merged in 67b421.
So the author can find the final version merge in the main branch.
Without squash merge, it then becomes very likely most commits do not even build making bisecting a bit of a nightmare.
I don't think I've ever found myself in a situation where I needed more granularity than the PR level when looking back through the history of a repo.
What are the situations where this is actually useful enough to make it worth the effort?
Some examples:
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9486...
One commit to improve messages; another to add a test case that also uses these messages. Forcing separate CI runs for these dependent commits doesn't make sense, but they also don't belong in a single commit.
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8996...
Adds two test cases for a regression and then finally reverts the specific regression-exposing commit from https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8197... while keeping the still-good parts. If the 8197 merge had been squashed, one would have had to manually bisect the hunks to find out which one actually caused the problem.
I guess I struggle to see where reverting entire commits makes more sense than just deleting the offending code in a new commit.
https://github.com/orgs/community/discussions/3478 ("Improve workflow when force-pushing during code reviews") could use more support.
I've also got lots of complaints in this section when LLVM switched to GitHub PR: https://maskray.me/blog/2023-09-09-reflections-on-llvm-switc...
Edit: "We COULD but we won’t" actually addresses that, but it just wasn't obvious to me that they were referring to that feature. I can't delete this comment anymore.
I thought maintainers can edit pull request? Why is that not used here?
The also say they don't want GitHub dictating them how to use git. I'd say, don't use GitHub then. Not pulling someones PR also means he does not get any public attribution to it. He doesn't show up as a contributor, too. I find that problematic and would say, there are simple ways around all the issues that have been listed, but the maintainers are just too stubborn to implement them.
The article says:
> That is however a clunky, annoying and time-consuming extra-step that not only requires that we (always) push code to other people’s branches, it also triggers a whole new round of CI jobs. This, only to get a purple blob instead of a red one. Not worth it.
> Not pulling someones PR also means he does not get any public attribution to it
I don't believe this is the case. Edited commits can keep the author (Author:, Co-Authored-By:).
> I'd say, don't use GitHub then
I'd say this would be throwing the baby with the bathwater.
(I'd also say amen to that though.)
> the maintainers are just too stubborn to implement them.
A gross mischaracterization of Daniel, from what I see. I was lucky to attend to his presentation at FOSDEM in February, he really seems to be a nice guy.
I don't know if Github has it, but GitLab supports "push options"[1] where you can say "skip CI". There are other mechanisms, but they stay in the history since they live in the commit message (and the summary of all places!).
Github seems allergic to any features that are mostly useful to "rewrite history" workflows though, so I wouldn't be surprised if that wasn't around.
> Not pulling someones PR also means he does not get any public attribution to it.
We use self-hosted GitLab and mirror on Github; I get boxes filled in on my Github account's grid and properly attributed in Github's stats despite only ever showing up there via `git push` commands.
[1]https://docs.gitlab.com/ee/user/project/push_options.html
Manually merging a commit with fixups does not remove any attribution, what are you talking about? Who determines "committers to this project" by looking at the list of PRs on Github instead of the contributor list in the repo, the commits in the repo, ...?
How that intent plays with Git as Git is done, versus how Github does it, I have no idea. But the existence of the article, and the perspective toward which it seems to be written, suggest to me the answer is "not well" and that Stenberg et al may be seeing the same questions and complaints frequently recurring about this.