-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Repo: Consider adding a bot that asks not to force push when that happens #5170
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
Comments
Can it actually be detected by a bot? I only know you can do it through a git pre-push hook, but not even a husky hook. |
Heh good question. https://stackoverflow.com/questions/69882152/is-it-possible-to-check-a-git-push-force-in-a-github-action has a giant essay of info I'm tl;dr-ing, followed by maybe useful tips. Not super sold on that leading to a solution, but you never know. https://stackoverflow.com/a/17503259/1830407 mentions there's a webhook capable event that includes a It would be nice for a clean+simple bot that we could open source for other repos to use ideally. But a webhook setup wouldn't be too much more work. |
Also, there's also a bit of a nuance here: for example, if a maintainer reviewed commit |
I'd still ask not to force push in that case though π. A couple reasons:
Let us see your typos! |
Eh, that's true. Hard to say which TZ the maintainer sits in these daysπ Just that the typos make me seem like a bad programmer. Lol |
Toooooo beeeeee fair. When I wrote that GH sucked at handing force push. It meant you had no idea about what changes were made. However now-a-days GH shows you a button that lets you compare before and after the force push. Idk if we really need that stipulation any more |
I thought it's about incremental reviews? Does it un-collapse all viewed files when you force-push the entire branch? |
There's that. I also find it annoying to review because it still messes with comments. Edit: oh, and I think a lot of people are in the habit of doing it because other repos don't squash merges (another feature GH has put more love into the last couple of years). They assume they still need to do that extra effort in our repo. It's nice to let them know they don't. |
Suggestion
The CONTRIBUTING.md asks not to force push. Yet a lot of PRs have force pushes. Clearly, not everyone is thoroughly reading+memorizing the contributing guides π.
How about we add a bot that says a more professional version of: "hey don't sweat it that you already force pushed but please don't keep doing it; it makes it harder for us to review because XYZ and we squash merge anyway" ?
The text was updated successfully, but these errors were encountered: