]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Deduplicate Git NAME and EMAIL variables
authorPetr Špaček <pspacek@isc.org>
Thu, 25 Sep 2025 10:20:24 +0000 (12:20 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 24 Oct 2025 02:42:58 +0000 (04:42 +0200)
As an additional perk, I hope JOB_ID will make it easier to debug it
something goes wrong with automated commits.

.gitlab-ci.yml

index 4d34fd96f2a87f81367776613094b81373d5ec81..41cd632a1ba8f0762be473b73ef007e46834b426 100644 (file)
@@ -4,6 +4,12 @@ variables:
   # Locale settings do not affect the build, but might affect tests.
   LC_ALL: C
 
+  # automated commits will inherit identification from pipeline trigger
+  GIT_AUTHOR_NAME: "$GITLAB_USER_NAME (GitLab job $CI_JOB_ID)"
+  GIT_AUTHOR_EMAIL: "$GITLAB_USER_EMAIL"
+  GIT_COMMITTER_NAME: "$GIT_AUTHOR_NAME"
+  GIT_COMMITTER_EMAIL: "$GIT_AUTHOR_EMAIL"
+
   CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
   CCACHE_DIR: "/ccache"
 
@@ -819,11 +825,6 @@ changelog:
   <<: *docs_job
   rules:
     - if: '$CI_MERGE_REQUEST_TITLE =~ /\s(dev|usr|pkg):/'
-  variables:
-    GIT_AUTHOR_NAME: $GITLAB_USER_NAME
-    GIT_AUTHOR_EMAIL: $GITLAB_USER_EMAIL
-    GIT_COMMITTER_NAME: $GITLAB_USER_NAME
-    GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL
   before_script:
     - echo -e "$CI_MERGE_REQUEST_TITLE\n" > commitmsg
     - sed -i 's/^Draft:\s*//' commitmsg
@@ -2047,9 +2048,6 @@ pairwise:
   # post-merge processes should run even if another MR was merged while the job was running (or queued)
   interruptible: false
   variables:
-    # automated commits will inherit identification from the user who pressed Merge button
-    GIT_COMMITTER_NAME: $GITLAB_USER_NAME
-    GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL
     # avoid leftover branches from previous jobs
     GIT_STRATEGY: clone
     # assumed max depth of a MR for backport or a rebased force-push