From 1896034cde7acc7188b0e0edeb58d84678394692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Fri, 17 Jan 2025 17:16:56 +0800 Subject: [PATCH] fix(pipeline): change variable declarations from var to def for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- first-class-pipeline/vars/pipelineCall.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/first-class-pipeline/vars/pipelineCall.groovy b/first-class-pipeline/vars/pipelineCall.groovy index 7c681406..5f28f8be 100644 --- a/first-class-pipeline/vars/pipelineCall.groovy +++ b/first-class-pipeline/vars/pipelineCall.groovy @@ -20,7 +20,7 @@ def call(Map configurations) { stage("Source Codes Checkout") { steps { scripts { - var sourceFetcher = new SourceFetcher(this) + def sourceFetcher = new SourceFetcher(this) sourceFetcher.fetch(configurations) } } @@ -37,7 +37,7 @@ def call(Map configurations) { stage("Commit Linting If Enabled") { steps { scripts { - enabled = "${configurations.COMMIT_MESSAGE_LINT_ENABLED}" + def enabled = "${configurations.COMMIT_MESSAGE_LINT_ENABLED}" if (enabled == "true") { print("Commit Linting is enabled")