]> 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:53:01 +0000 (04:53 +0200)
As an additional perk, I hope JOB_ID will make it easier to debug it
something goes wrong with automated commits.

(cherry picked from commit 43b96289554936028bf6acf0e8ee8b4216953998)

.gitlab-ci.yml

index df4e9a880744bca7ad84267a400255b3487336a6..f3cd485548520b82f7d9c887dea0198457312bb6 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"
 
@@ -816,10 +822,6 @@ changelog:
   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
     DOC_MAKE_TARGET: html
   before_script:
     - echo -e "$CI_MERGE_REQUEST_TITLE\n" > commitmsg
@@ -1973,9 +1975,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