[polari/gnome-3-38] ci: Check that merge requests have the right settings



commit d5af7478c905e62d15eb81ce270a7399d7ae0270
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Nov 20 19:16:35 2020 +0100

    ci: Check that merge requests have the right settings
    
    This will catch the missing "allow write access for maintainers" check
    box being checked.
    
    https://gitlab.gnome.org/GNOME/polari/-/merge_requests/170

 .gitlab-ci.yml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a21139c5..f92a5706 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,6 +32,25 @@ check_commit_log:
         reports:
             junit: commit-message-junit-report.xml
 
+check-merge-request:
+    extends:
+        - .fdo.ci-fairy
+    stage: pre_review
+    script:
+        - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+          then
+            ci-fairy check-merge-request --require-allow-collaboration 
--junit-xml=check-merge-request-report.xml ;
+          else
+            echo "Not a merge request" ;
+          fi
+    <<: *only_default
+    artifacts:
+        expire_in: 1 week
+        paths:
+            - check-merge-request-report.xml
+        reports:
+            junit: check-merge-request-report.xml
+
 eslint:
     image: registry.gitlab.gnome.org/gnome/gnome-shell/fedora/33:2020-11-17.0
     stage: review


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]