---
- scm:
    name: deploy-lag-badger-repo
    scm:
        - git:
            url: git@github.com:alphagov/govuk-deploy-lag-badger.git
            branches:
              - master

- job:
    name: run-deploy-lag-badger
    display-name: Run deploy lag badger
    project-type: freestyle
    description: "The deploy lag badger notifies developers that there are undeployed PRs"
    scm:
      - deploy-lag-badger-repo
    logrotate:
        numToKeep: 100
    triggers:
        - timed: |
            TZ=Europe/London
            0 13 * * 1-5
    properties:
        - build-discarder:
            days-to-keep: 30
            artifact-num-to-keep: 5
    builders:
        - shell: |
            export REALLY_POST_TO_SLACK=1
            bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
            bundle exec rake run
    wrappers:
      - ansicolor:
          colormap: xterm
      - inject-passwords:
          global: false
          mask-password-params: true
          job-passwords:
            - name: GITHUB_TOKEN
              password:
                '<%= @github_token %>'

---
- scm:
    name: deploy-lag-badger-repo
    scm:
        - git:
            url: git@github.com:alphagov/govuk-deploy-lag-badger.git
            branches:
              - main

- job:
    name: run-deploy-lag-badger
    display-name: Run deploy lag badger
    project-type: freestyle
    description: "The deploy lag badger notifies developers that there are undeployed PRs"
    scm:
      - deploy-lag-badger-repo
    logrotate:
        numToKeep: 100
    triggers:
        - timed: |
            TZ=Europe/London
            0 13 * * 1-5
    properties:
        - build-discarder:
            days-to-keep: 30
            artifact-num-to-keep: 5
    builders:
        - shell: |
            export REALLY_POST_TO_SLACK=1
            bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
            bundle exec rake run
    wrappers:
      - ansicolor:
          colormap: xterm
      - inject-passwords:
          global: false
          mask-password-params: true
          job-passwords:
            - name: GITHUB_TOKEN
              password:
                '<%= @github_token %>'

Update deploy-lag-badger job to use main branch
Update deploy-lag-badger job to use main branch

This is in preparation to switch the deploy-lag-badger-repo to use
`main` as its default branch.
