cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

[WIP]Add git hooks for Cloudberry Database development

Open tuhaihe opened this issue 2 years ago • 3 comments

Don't merge this PR, until it is ready!


Change logs

For better development quality, we customize the Git hooks to remind developers to check their work. We use pre-commit, prepare-commit-msg, commit-msg, and pre-push hooks to trigger automatic checks when running git commit and git push.

Why are the changes needed?

For better development quality

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Install the hooks in the new dir.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • [ ] Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • [ ] Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • [ ] Learn the coding contribution guide, including our code conventions, workflow and more.
  • [ ] List your communication in the GitHub Issues or Discussions (if has or needed).
  • [ ] Document changes.
  • [ ] Add tests for the change
  • [ ] Pass make installcheck
  • [ ] Pass make -C src/test installcheck-cbdb-parallel
  • [ ] Feel free to @cloudberrydb/dev team for review and approval when your PR is ready🥳

tuhaihe avatar Sep 26 '23 02:09 tuhaihe

wut'bout using https://github.com/jorisroovers/gitlint? I think introducing a python dependencies is far better than wiring unportable shell scripts that differs from shell to shell. besides, our gpinitsystem etc. utilities already relied on Python 3 environment so this should not introduce any external dependency.

Ray-Eldath avatar Nov 03 '23 03:11 Ray-Eldath

Seems the PR is not active for a long time. Do we still need this?

my-ship-it avatar Aug 28 '24 01:08 my-ship-it

Seems the PR is not active for a long time. Do we still need this?

Please keep this PR for now. I will discuss this with our DevOps team. If no longer needed, then close it. Thanks.

tuhaihe avatar Aug 28 '24 02:08 tuhaihe