name: All Green
on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  all-green:
    name: all-green  # do not change this name, see https://github.com/DataDog/ensure-ci-success/blob/main/docs/limitations.md
    runs-on: ubuntu-latest
    permissions:
      checks: read
      contents: read
    steps:
      - uses: DataDog/ensure-ci-success@727e7fe39ae2e1ce7ea336ec85a7369ab0731754 # v2.1.1
        with:
          initial-delay-seconds: 10  # wait for this delay before starting
          polling-interval-seconds: 1 # after a failure, how long do it wait before checking again
          max-retries: 60  # how many retries before stopping
          ignored-name-patterns: |
            Bootstrap import analysis
            require-checklist
            pr_name_lint
            Validate changelog
            Report codeowners
            devflow/.*
            dd-gitlab/.*

# Why some checks are excluded?
#
# - Bootstrap import analysis: TO BE ADDED (Success rate of 88% as of 2025-04-17)
# - require-checklist: this job is triggered by a change on PR description, and already explcititly required
# - Validate changelog: this job is triggered by a change on labels, and already explcititly required
