parameters:
- name: PackageName
  type: string
  default: 'not-specified'
- name: ServiceName
  type: string
  default: ''
- name: ServiceDirectory
  type: string
  default: ''
- name: ForRelease
  type: boolean
  default: false

steps:
  - task: Powershell@2
    inputs:
      filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLog.ps1
      arguments: >
        -PackageName '${{ parameters.PackageName }}'
        -ServiceDirectory '${{ coalesce(parameters.ServiceDirectory, parameters.ServiceName) }}'
        -ForRelease $${{ parameters.ForRelease }}
      pwsh: true
      workingDirectory: $(Pipeline.Workspace)
    displayName: Verify ChangeLogEntry for ${{ parameters.PackageName }}
    continueOnError: false
