gitlab-ci: Fix submodule linting of commits
[ghc.git] / .gitlab-ci.yml
index 8744622..570ea48 100644 (file)
@@ -79,19 +79,12 @@ ghc-linters:
   script:
     - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
     - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
-    - "echo Linting changes between $base..$CI_COMMIT_SHA"
+    - "echo Linting submodule changes between $base..$CI_COMMIT_SHA"
     - submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
   dependencies: []
   tags:
     - lint
 
-lint-submods:
-  extends: .lint-submods
-  only:
-    refs:
-      - master
-      - /ghc-[0-9]+\.[0-9]+/
-
 lint-submods-marge:
   extends: .lint-submods
   only:
@@ -112,6 +105,16 @@ lint-submods-mr:
     variables:
       - $CI_MERGE_REQUEST_LABELS =~ /.*wip/marge_bot_batch_merge_job.*/
 
+lint-submods-branch:
+  extends: .lint-submods
+  script:
+    - "echo Linting submodule changes for $CI_COMMIT_SHA"
+    - submodchecker .git $CI_COMMIT_SHA
+  only:
+    refs:
+      - master
+      - /ghc-[0-9]+\.[0-9]+/
+
 .lint-changelogs:
   stage: lint
   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"