[mutter] ci: Replace custom commit-log script with ci-fairy
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] ci: Replace custom commit-log script with ci-fairy
- Date: Mon, 11 Jan 2021 13:39:06 +0000 (UTC)
commit bd15cfc94bef40ef345cee5a5b52fc9a7ccc5c87
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Dec 13 03:57:00 2020 +0100
ci: Replace custom commit-log script with ci-fairy
ci-fairy now supports checking commit messages for required/disallowed
patterns. Use that to replace our custom commit-log script.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1649>
.gitlab-ci.yml | 11 +++-
.gitlab-ci/check-commit-log.sh | 121 -----------------------------------------
.gitlab-ci/commit-rules.yml | 19 +++++++
3 files changed, 27 insertions(+), 124 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e353627171..224d407cb9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,6 @@
include:
- - remote:
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/8445ff7af2a68795afb98f486251f2ef8f90621c/templates/fedora.yml'
- - remote:
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/8445ff7af2a68795afb98f486251f2ef8f90621c/templates/ci-fairy.yml"
+ - remote:
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/18194044f0f984c8815bc9a1a146582f6bf15d41/templates/fedora.yml'
+ - remote:
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/6f86b8bcb0cd5168c32779c4fea9a893c4a0c046/templates/ci-fairy.yml"
stages:
- review
@@ -85,7 +85,12 @@ check-commit-log:
variables:
GIT_DEPTH: "100"
script:
- - ./.gitlab-ci/check-commit-log.sh
+ - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ then
+ ci-fairy check-commits --junit-xml=commit-message-junit-report.xml ;
+ else
+ echo "Not a merge request" ;
+ fi
artifacts:
expire_in: 1 week
paths:
diff --git a/.gitlab-ci/commit-rules.yml b/.gitlab-ci/commit-rules.yml
new file mode 100644
index 0000000000..1ae43374c1
--- /dev/null
+++ b/.gitlab-ci/commit-rules.yml
@@ -0,0 +1,19 @@
+patterns:
+ deny:
+ - regex: '^$CI_MERGE_REQUEST_PROJECT_URL/(-/)?merge_requests/$CI_MERGE_REQUEST_IID$'
+ message: Commit message must not contain a link to its own merge request
+ - regex: '^(meta-|Meta)'
+ message: Commit message subject should not be prefixed with 'meta-' or 'Meta'
+ where: subject
+ - regex: '^(clutter-|Clutter)'
+ message: Commit message subject should not be prefixed with 'clutter-' or 'Clutter', use 'clutter/'
instead
+ where: subject
+ - regex: '^(cogl-|Cogl)'
+ message: Commit message subject should not be prefixed with 'cogl-' or 'Cogl', use 'cogl/' instead
+ where: subject
+ - regex: '^[^:]+: [a-z]'
+ message: "Commit message subject should be properly Capitalized. E.g. 'window: Marginalize
extradicity'"
+ where: subject
+ - regex: '^\S*\.[ch]:'
+ message: Commit message subject prefix should not include .c, .h, etc.
+ where: subject
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]