diff --git a/latex-review-apps/review.yml b/latex-review-apps/review.yml
index 1bcb4651e0e9b7a4748d0f9b8a2c6cd30f4c2193..c4e469143410b51c0c193aad6f369e9fc843457a 100644
--- a/latex-review-apps/review.yml
+++ b/latex-review-apps/review.yml
@@ -11,15 +11,15 @@ review:
       ./generate-review-app.sh \
         $NAME \
         $CI_REGISTRY/$CI_PROJECT_PATH/review/$CI_COMMIT_REF_NAME \
-        $CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org \
+        $CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org \
         $AUTHPASSWORD
     - source <(curl -s -k https://git.dbogatov.org/templates/ci-snippets/raw/master/setup-kubectl.sh)
     - kubectl --namespace=review delete secret $NAME-basic-auth || true
     - kubectl --namespace=review create secret generic $NAME-basic-auth --from-file=./out/auth
     - kubectl apply -R -f ./out
   environment:
-    name: review/$CI_BUILD_REF_NAME
-    url: https://$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org
+    name: review/$CI_COMMIT_BRANCH
+    url: https://$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org
     on_stop: stop_review
     auto_stop_in: 1 week
   rules:
diff --git a/latex-review-apps/stop-review.yml b/latex-review-apps/stop-review.yml
index 2c39aa65d5ed051cb81f7fd1c6f5fbdb6c22473b..ee3a2e21d7fe9f0ab61be6101081d4f7ed0b11d6 100644
--- a/latex-review-apps/stop-review.yml
+++ b/latex-review-apps/stop-review.yml
@@ -9,7 +9,7 @@ stop_review:
       ./generate-review-app.sh \
         $NAME \
         $CI_REGISTRY/$CI_PROJECT_PATH/review/$CI_COMMIT_REF_NAME \
-        $CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org \
+        $CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org \
         $AUTHPASSWORD
     - source <(curl -s -k https://git.dbogatov.org/templates/ci-snippets/raw/master/setup-kubectl.sh)
     - kubectl delete -R -f ./out
@@ -18,7 +18,7 @@ stop_review:
     GIT_STRATEGY: none
   dependencies: []
   environment:
-    name: review/$CI_BUILD_REF_NAME
+    name: review/$CI_COMMIT_BRANCH
     action: stop
   rules:
     - if: "$DISABLE_REGULAR_PIPELINE"
diff --git a/quality-security/accessibility.yml b/quality-security/accessibility.yml
index 1ed05d89d78ce423600b04274751fbf81a9def5c..92e13e6c9bfef3b82b46baf1e5b0edeb36f196a7 100644
--- a/quality-security/accessibility.yml
+++ b/quality-security/accessibility.yml
@@ -4,7 +4,7 @@ a11y:
   image: registry.gitlab.com/gitlab-org/ci-cd/accessibility:5.3.0-gitlab.3
   variables:
     GIT_STRATEGY: none
-    a11y_urls: https://$AUTH$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org
+    a11y_urls: https://$AUTH$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org
   script: /gitlab-accessibility.sh $a11y_urls
   allow_failure: true
   artifacts:
diff --git a/quality-security/dast.yml b/quality-security/dast.yml
index 8c4258f035001810c2517ca30be0dbdc79cac5d1..dd4ed1e58fd8f62ff75f948f8284822398e988ce 100644
--- a/quality-security/dast.yml
+++ b/quality-security/dast.yml
@@ -4,7 +4,7 @@ include:
 dast:
   stage: test
   variables:
-    DAST_WEBSITE: https://$AUTH$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org
+    DAST_WEBSITE: https://$AUTH$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org
     DAST_FULL_SCAN_ENABLED: "true"
   rules:
     - when: manual
diff --git a/quality-security/performance.yml b/quality-security/performance.yml
index 8b75bf3d62c8fdc988dddb612ad4d1b4a775590a..8bde77c0fa530c8da761aa54f4ea6345da2c4895 100644
--- a/quality-security/performance.yml
+++ b/quality-security/performance.yml
@@ -6,7 +6,7 @@ browser_performance:
   variables:
     GIT_STRATEGY: none
     SITESPEED_OPTIONS: -n 1 -d 2 --visualMetrics false --video false
-    URL: https://$AUTH$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org/
+    URL: https://$AUTH$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org/
   rules:
     - when: manual
       allow_failure: true
diff --git a/scripts/tidy.sh b/scripts/tidy.sh
index 6d2fea794eb4a576bf48732dc9ad3aaecd654008..8dc7d7b27838b217026fb1d806cc597c74bfcad3 100644
--- a/scripts/tidy.sh
+++ b/scripts/tidy.sh
@@ -8,7 +8,7 @@ FAIL=()
 
 for url in $TIDY_URLS
 do
-	curl -Ls https://$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org/$TIDY_PREFIX/$url$TIDY_SUFFIX | tidy $TIDY_CONFIG -e &> tidy.out || true
+	curl -Ls https://$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org/$TIDY_PREFIX/$url$TIDY_SUFFIX | tidy $TIDY_CONFIG -e &> tidy.out || true
 	cat tidy.out
 
 	if cat tidy.out | grep -q '\- Warning:'
diff --git a/simple-website/blc.yml b/simple-website/blc.yml
index 26ce9a967a6ee7c4c1342eec367501578d8ba4fd..20a56a2b61862849fb1b532ff3284ba3990b60ac 100644
--- a/simple-website/blc.yml
+++ b/simple-website/blc.yml
@@ -9,7 +9,7 @@ blc:
     BLC_EXCLUDE: |
       --exclude *linkedin.* --exclude *facebook.*
   script:
-    - blc --filter-level 3 --input https://$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org/$BLC_INDEX -rog $BLC_EXCLUDE > blc.out || true
+    - blc --filter-level 3 --input https://$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org/$BLC_INDEX -rog $BLC_EXCLUDE > blc.out || true
     - cat blc.out
     - cat blc.out | grep 'Finished!' | tail -1 | grep '0 broken.'
   when: delayed
diff --git a/simple-website/bli.yml b/simple-website/bli.yml
index bf15f0e4a3c737da38af9e883dc417b83f244d99..cbcd9454293c0fcbaca0606ac262746292bc5702 100644
--- a/simple-website/bli.yml
+++ b/simple-website/bli.yml
@@ -8,7 +8,7 @@ bli:
     BLC_INDEX: ""
     BLC_EXCLUDE: ""
   script:
-    - bli inspect https://$AUTH$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org/$BLC_INDEX -r -t 30000 --reporters console,junit --ignore-skipped $BLC_EXCLUDE
+    - bli inspect https://$AUTH$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org/$BLC_INDEX -r -t 30000 --reporters console,junit --ignore-skipped $BLC_EXCLUDE
   when: delayed
   start_in: 30 seconds
   artifacts:
diff --git a/simple-website/review/review.yml b/simple-website/review/review.yml
index 2fe53d220441abf7d3020267a3d37a182c56db77..2c45ecc30513506fea115c4e8a95f5d343b1712e 100644
--- a/simple-website/review/review.yml
+++ b/simple-website/review/review.yml
@@ -12,15 +12,15 @@ review:
       ./generate-review-app.sh \
         $NAME \
         $CI_REGISTRY/$CI_PROJECT_PATH/review/$CI_COMMIT_REF_NAME \
-        $CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org \
+        $CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org \
         $AUTHPASSWORD
     - source <(curl -k -s https://git.dbogatov.org/templates/ci-snippets/raw/master/setup-kubectl.sh)
     - kubectl --namespace=review delete secret $NAME-basic-auth || true
     - kubectl --namespace=review create secret generic $NAME-basic-auth --from-file=./out/auth
     - kubectl apply -R -f ./out
   environment:
-    name: review/$CI_BUILD_REF_NAME
-    url: https://$CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org
+    name: review/$CI_COMMIT_BRANCH
+    url: https://$CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org
     on_stop: stop_review
     auto_stop_in: 1 week
   only:
diff --git a/simple-website/review/stop-review.yml b/simple-website/review/stop-review.yml
index e63e82be827c88400fb2250a45462ec93c5087bc..99f81b7b758c6f3b9c0da59df995576a3a60d663 100644
--- a/simple-website/review/stop-review.yml
+++ b/simple-website/review/stop-review.yml
@@ -10,7 +10,7 @@ stop_review:
       ./generate-review-app.sh \
         $NAME \
         $CI_REGISTRY/$CI_PROJECT_PATH/review/$CI_COMMIT_REF_NAME \
-        $CI_BUILD_REF_NAME-$CI_PROJECT_NAME.review.dbogatov.org \
+        $CI_COMMIT_BRANCH-$CI_PROJECT_NAME.review.dbogatov.org \
         $AUTHPASSWORD
     - source <(curl -k -s https://git.dbogatov.org/templates/ci-snippets/raw/master/setup-kubectl.sh)
     - kubectl delete -R -f ./out
@@ -19,7 +19,7 @@ stop_review:
     GIT_STRATEGY: none
   dependencies: []
   environment:
-    name: review/$CI_BUILD_REF_NAME
+    name: review/$CI_COMMIT_BRANCH
     action: stop
   only:
     - branches