[gnome-shell-extensions] ci: Replace custom commit-log script with ci-fairy
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] ci: Replace custom commit-log script with ci-fairy
- Date: Fri, 18 Dec 2020 18:52:49 +0000 (UTC)
commit 02aa68b24a71dd27dcc1bf0b41082110872b51a3
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Dec 17 14:15:32 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/gnome-shell-extensions/-/merge_requests/149>
.gitlab-ci.yml | 9 +++--
.gitlab-ci/check-commit-log.sh | 74 ------------------------------------------
.gitlab-ci/commitrules.yml | 4 +++
3 files changed, 11 insertions(+), 76 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8321355..704b7e5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
include:
- - 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/ci-fairy.yml"
image: registry.gitlab.gnome.org/gnome/gnome-shell/fedora/33:2020-11-17.0
@@ -43,7 +43,12 @@ check_commit_log:
- .fdo.ci-fairy
stage: pre_review
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
<<: *pipeline_guard
artifacts:
expire_in: 1 week
diff --git a/.gitlab-ci/commitrules.yml b/.gitlab-ci/commitrules.yml
new file mode 100644
index 0000000..ef7d080
--- /dev/null
+++ b/.gitlab-ci/commitrules.yml
@@ -0,0 +1,4 @@
+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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]