Help with a pipline script that i can't seem to understand

i have a declarative pipeline that was causing me some problems lately. i put my hand on the block of script that was the source of the problem but since i’m new to jenkins i can’t figure out what it does exactly and here is the block :

checkout changelog: true, poll: true, scm: [

            $class: 'GitSCM',

            branches: [[name: "origin/${env.gitlabSourceBranch}"]],

            doGenerateSubmoduleConfigurations: false,

            extensions: [[$class: 'PreBuildMerge', options: [fastForwardMode: 'NO_FF', mergeRemote: 'origin', mergeStrategy: 'DEFAULT', mergeTarget: "${env.gitlabTargetBranch}"]]],

            submoduleCfg: [],

            userRemoteConfigs: [[credentialsId: "${env.GIT_REPO_CREDENTIAL_ID}",name: 'origin', url: pipelineParams.scmUrl ]]

            ]

can someone please help me figure out what this does exactly when i run it through a jenkins build ?
P.S : this block is inside of a try/catch

Declarative pipelines by default clone the related SCM repos. That command is explicitly checking out (cloning) the associated repo, I think maybe a different branch or something?

A post was split to a new topic: ERROR: Couldn’t find any revision to build