ci: check commit using ci-fairy
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Thu, 11 Jun 2020 12:45:24 +0000 (14:45 +0200)
committerJordan Petridis <jordan@centricular.com>
Fri, 27 Nov 2020 00:49:30 +0000 (02:49 +0200)
See https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#checking-commits

In this setup it will check for any leftover fixup!/squash! commits and
that messages don't have the 'Signed-off-by:' tag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/304>

gitlab/ci_template.yml

index 788d960..e09faa8 100644 (file)
@@ -1,3 +1,6 @@
+include:
+  - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/7ea696055e322cc7aa4bcbe5422b56a198c4bdff/templates/ci-fairy.yml"
+
 stages:
   - 'build docker'
   - 'preparation'
@@ -389,6 +392,18 @@ gst indent:
       fi
 
 #
+# Check commit messages with ci-fairy
+#
+check commits:
+  extends: '.fdo.ci-fairy'
+  needs: []
+  stage: 'preparation'
+  variables:
+    GIT_STRATEGY: 'fetch'
+  script:
+    - ci-fairy check-commits --textwidth 0 --no-signed-off-by
+
+#
 # gst-build setup templates
 #
 .gst_build_template: &gst_build