Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Dependabot PRs #19745

Merged
merged 8 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: "/"
schedule:
interval: weekly
day: "sunday"
time: "09:00" # 9am UTC
ignore:
# Deprecated APIs, requires manual changes.
# TODO(xacrimon): Update Firestore and solve deprecations.
Expand Down Expand Up @@ -42,6 +44,8 @@ updates:
directory: "/api"
schedule:
interval: weekly
day: "sunday"
time: "09:00" # 9am UTC
ignore:
# TODO(tross): Update after Firestore is updated
- dependency-name: google.golang.org/genproto
Expand All @@ -57,6 +61,8 @@ updates:
directory: "/"
schedule:
interval: weekly
day: "sunday"
rosstimothy marked this conversation as resolved.
Show resolved Hide resolved
time: "09:00" # 9am UTC
open-pull-requests-limit: 10
reviewers:
- codingllama
Expand All @@ -67,6 +73,8 @@ updates:
directory: "/lib/srv/desktop/rdp/rdpclient"
schedule:
interval: weekly
day: "sunday"
time: "09:00" # 9am UTC
open-pull-requests-limit: 10
reviewers:
- codingllama
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/assign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:
jobs:
auto-request-review:
name: Auto Request Review
if: ${{ !github.event.pull_request.draft }}
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
steps:
# Checkout main branch of shared-workflow repository.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
jobs:
build:
name: Build on Mac OS
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: macos-12 # TODO(r0mant): Update with large runner when it's available

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
jobs:
build:
name: Build on Windows
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: windows-2022-16core

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ permissions:
jobs:
check-reviews:
name: Checking reviewers
if: ${{ !github.event.pull_request.draft }}
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
steps:
# Checkout main branch of shared-workflow repository.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
fuzzing:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
name: Fuzzing
runs-on: ubuntu-22.04-32core
permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
jobs:
analyze:
name: Analyze
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-32core
permissions:
actions: read
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-batcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow combines all open Dependabot PRs into a single batched
# PR, links all the Dependabot PRs to the new one, and closes all the
# Dependabot PRs. The schedule is set to exactly 12 hours after the
# Dependabot schedule.
#
# All workflows that run on PR should be skipped for Dependabot PRs
# to prevent wasting CI cycles.
name: 'Dependabot Batcher'
on:
workflow_dispatch:
schedule:
- cron: '0 21 * * 0' # At 9:00 PM every Sunday UTC

permissions:
pull-requests: write
contents: write

jobs:
dependabot-batcher:
name: 'Combine Dependabot PRs'
runs-on: ubuntu-latest
steps:
- name: 'Dependabot Batcher'
uses: Legal-and-General/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }} #required
baseBranchName: 'master'
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
dependency-review:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
uses: gravitational/shared-workflows/.github/workflows/dependency-review.yaml@main
permissions:
contents: read
1 change: 1 addition & 0 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
doc-tests:
name: Lint (Docs)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests-non-root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
test:
name: Integration Tests (Non-root)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-16core

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests-root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
test:
name: Integration Tests (Root)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-16core

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:
jobs:
auto-label-pr:
name: Label Pull Request
if: ${{ !github.event.pull_request.draft }}
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
steps:
# Checkout main branch of shared-workflow repository.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
lint:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
name: Lint (Go)
runs-on: ubuntu-22.04-16core

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/os-compatibility-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
build:
name: OS Compatibility Build
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-16core

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
test:
name: Unit Tests (Go)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-32core

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
jobs:
test:
name: Unit Tests (Operator)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-22.04-16core

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
test:
name: Unit Tests (Rust)
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest

permissions:
Expand Down