diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2023-02-16 00:30:15 -0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2023-02-24 00:22:19 +0000 |
commit | 5586511446a9988af7b5e19b61c151b5d1111691 (patch) | |
tree | acc629bcc3a1473ca846c3c0283983ef2b2fc27b /meson.build | |
parent | fb076db1b2a48f7e07bc851c4d4f72a3d269a109 (diff) | |
download | gstreamer-5586511446a9988af7b5e19b61c151b5d1111691.tar.gz |
ci: Add a job to verify commit messages on MRs
This uses [gitlint] and is based on their linting rules with some minor
config so it matches our style pretty well.
[gitlint]: https://jorisroovers.com/gitlint/#configuration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3980>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 79974538b9..abc46b6d3e 100644 --- a/meson.build +++ b/meson.build @@ -33,6 +33,14 @@ endif # Install gst-indent pre-commit hook run_command(python3, '-c', 'import shutil; shutil.copy("scripts/git-hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")', check: false) + +gitlint = find_program('gitlint', required: false) +if gitlint.found() + run_command(gitlint, 'install-hook', check: false) +else + message('gitlint not found, please install it with your package manager or `python3 -m pip install gitlint` to enable the commit message hook') +endif + # On macOS, you have to run "Install Certificates.command" otherwise Python # doesn't have access to the latest SSL CA Certificates, and Meson will fail to # download wrap files from websites that use, for example, Let's Encrypt. |