workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "api"
    - if: $CI_PIPELINE_SOURCE == "web"
command:
  timeout: 24 hours
  image: paritytech/ci-unified:bullseye-1.81.0-2024-11-19-v202411281558
  tags:
    - linux-docker-vm-c2
  variables:
    PIPELINE_SCRIPTS_REF: main
    GH_OWNER: paritytech
    GH_OWNER_REPO: polkadot-sdk
    GH_OWNER_BRANCH: master
    GH_CONTRIBUTOR: dharjeezy
    GH_CONTRIBUTOR_REPO: polkadot-sdk
    GH_CONTRIBUTOR_BRANCH: dami/pallet_conviction_voting_block_number_provider
    GH_HEAD_SHA: 7dd5d1b517cbf32419523d645bb93af9940a6040
    COMMIT_MESSAGE: '"$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh"'
    PIPELINE_SCRIPTS_REPOSITORY: https://github.com/paritytech/command-bot-scripts/
    PIPELINE_SCRIPTS_DIR: .git/.scripts
  script:
    - ""
    - '        echo "This job is related to task
      1-365b9fc9-76e8-416a-999b-74f01eb16c80. The task was generated from a
      comment in
      https://github.com/paritytech/polkadot-sdk/pull/6621#issuecomment-2642257150."'
    - ""
    - "        # The scripts repository might be left over from a previous run
      in the"
    - "        # same Gitlab shell executor"
    - '        rm -rf "$PIPELINE_SCRIPTS_DIR"'
    - ""
    - '        if [ "${PIPELINE_SCRIPTS_REPOSITORY:-}" ]; then'
    - '          if [ "${PIPELINE_SCRIPTS_REF:-}" ]; then'
    - '            git clone --progress --verbose --depth 1 --branch
      "$PIPELINE_SCRIPTS_REF" "$PIPELINE_SCRIPTS_REPOSITORY"
      "$PIPELINE_SCRIPTS_DIR"'
    - "          else"
    - '            git clone --progress --verbose --depth 1
      "$PIPELINE_SCRIPTS_REPOSITORY" "$PIPELINE_SCRIPTS_DIR"'
    - "          fi"
    - "        fi"
    - '        export ARTIFACTS_DIR="$PWD/.git/.artifacts"'
    - "        # The artifacts directory might be left over from a previous run
      in"
    - "        # the same Gitlab shell executor"
    - '        rm -rf "$ARTIFACTS_DIR"'
    - '        mkdir -p "$ARTIFACTS_DIR"'
    - "        "
    - '"$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh"'
  artifacts:
    name: ${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}
    expire_in: 7 days
    when: always
    paths:
      - .git/.artifacts