-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
discuss: we need to take better care when landing commits #6331
Comments
Sounds like a plan. To avoid the chicken/egg problem, the tool should perhaps be written in python? I think it could be a script in <10 lines in tools/. |
I've had "implement a commit linter" on my todo list for quite some time but haven't been able to get around to it. Having something that can run as a pre-push git hook that can bail if things aren't right would be excellent. |
@bnoordhuis do you really think it would be a problem? Our linter is already written in JavaScript. Seems like Node would have to be extremely broken for it to be an issue. |
I was thinking more of people that want to do small documentation updates and don't want to wait for a full build. |
Can something like this be added to the github bot perhaps? That way you wouldn't have to rely on locally-installed git hooks. |
It possibly could, but it'd be helpful to have a final check before the
|
I've been thinking about a commit landing CLI tool that could handle Reviewed-By, PR-URL, formatting and more (some details at nodejs/build#325), but I've been putting it off because it's not trivial to interface with |
So we will likely have a chicken / egg problem with validating the commit in CI as well. I think it makes sense to do a validation on title / content... but meta data won't be added until the commit is landed. Incremental steps ftw though... I'd love to see something in CI that can warn us about non meta data related problems |
I'd favor something like another make target along the lines of make checkcommit. That would be easy for collaborators to run after they update the top commit but before they push. I might need to take an argument with the number of commits to validate in order to handle cases there the PR consists of more than one. This probably fits with Ben's suggestion that it be written in python and live in tools |
👍 I've long stated that I thought a CLI tool was appropriate for these problems. As a note, @rvagg has a tool for part of the commit metadata: https://github.com/rvagg/iojs-tools/tree/master/pr-metadata |
Also, I think we should avoid more python since this isn't for bootstrapping. We'll probably get more contributions if it is in JavaScript. |
I'd like to move this logic to the github bot and create two jobs we can run on all pr's (all commits), namely:
These are both cheap enough to run a lot and I'd like to introduce a rule that each branch needs a force push (if you're able) with the commit that intends to land in master so that this bot can deem it ok. It's not perfect and doesn't solve the "someone else merges" problem (pushing to a pr/12345 doesn't work), but its an improvement for the standard workflow. |
closing in favor of #6543 |
4 out of the last 10 commits do not adhere to our commit guidelines. We need to take more care when landing these commits:
I've been working on a tool to help validate the build system(s), line length, and format in general. Maybe we could add a jenkins job that validates the commit message or something?
The text was updated successfully, but these errors were encountered: