{{ if has "gitlab" .Values.global.gitProviders }}
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
  name: gitlab-binding-review
  labels:
    {{- include "edp-tekton.labels" . | nindent 4 }}
spec:
  params:
    - name: gitrevision
      value: "$(extensions.pullRequest.headSha)"
    - name: gitrepositoryurl
      value: $(body.project.git_ssh_url)
    - name: gitrepositoryname
      value: $(body.project.name)
    - name: gitfullrepositoryname
      value: $(body.project.path_with_namespace)
    - name: targetBranch
      value: "$(extensions.targetBranch)"
    - name: changeNumber
      value: "$(extensions.pullRequest.changeNumber)"
    - name: commitMessagePattern
      value: "$(extensions.spec.commitMessagePattern)"
    - name: commitMessage
      value: "$(extensions.pullRequest.lastCommitMessage)"
    - name: codebase
      value: "$(extensions.codebase)"
    - name: codebasebranch
      value: "$(extensions.codebasebranch)"
    # get the pipeline name from the codebasebranch spec
    - name: pipelineName
      value: $(extensions.pipelines.review)
{{ end }}
