Skip to content

Commit 4a31f90

Browse files
Dependabot Enhancements:
- Ignore updating patch versions to focus on major and minor updates. - Limit number of PRs opened. - Add dependabot labeler workflow to add required labels to automatically add PRs to merge queues. - Add merge_group condition on test workflows to be ran on merge queues.
1 parent 2e28f8a commit 4a31f90

File tree

5 files changed

+42
-9
lines changed

5 files changed

+42
-9
lines changed

Diff for: .github/dependabot.yml

+22-9
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,39 @@
44
version: 2
55
updates:
66
# This is to update requirements.txt files in the guided-demos, and e2e directories.
7-
# The group configuration option is used to group updates for consistency across related directories.
87
- package-ecosystem: "pip"
98
directories:
109
- "**/demo-notebooks/guided-demos*"
1110
- "/tests/e2e"
1211
schedule:
13-
interval: "weekly"
14-
groups:
15-
requirements.txt:
16-
patterns:
17-
- "*"
18-
open-pull-requests-limit: 10
12+
interval: "daily"
13+
ignore:
14+
- dependency-name: "*"
15+
update-types: ["version-update:semver-patch"]
16+
open-pull-requests-limit: 4
1917
labels:
2018
- "test-guided-notebooks"
2119

2220
# pip means poetry in this case, this keeps poetry.lock up to date with constraints in pyproject.toml.
2321
- package-ecosystem: "pip"
2422
directory: "/"
2523
schedule:
26-
interval: "weekly"
27-
open-pull-requests-limit: 10
24+
interval: "daily"
25+
ignore:
26+
- dependency-name: "*"
27+
update-types: ["version-update:semver-patch"]
28+
open-pull-requests-limit: 1
2829
labels:
2930
- "test-guided-notebooks"
31+
32+
# npm means yarn in this case, this keeps yarn.lock up to date with constraints in package.json.
33+
- package-ecosystem: "npm"
34+
directory: "/ui-tests"
35+
schedule:
36+
interval: "daily"
37+
ignore:
38+
- dependency-name: "*"
39+
update-types: ["version-update:semver-patch"]
40+
open-pull-requests-limit: 1
41+
labels:
42+
- "test-ui-notebooks"

Diff for: .github/workflows/dependabot-labeler.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This workflow file adds the 'lgtm' and 'approved' labels to Dependabot PRs
2+
# This is done to ensure that the PRs that pass e2e are automatically merged/added to merge-queues by the CodeFlare bot
3+
name: Dependabot Labeler
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
add-approve-lgtm-label:
10+
if: github.actor == 'dependabot[bot]'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Add approve and lgtm labels to Dependabot PR
14+
run: |
15+
gh pr edit ${{ github.event.pull_request.number }} --add-label "lgtm" --add-label "approved"
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}

Diff for: .github/workflows/e2e_tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- '**.adoc'
2020
- '**.md'
2121
- 'LICENSE'
22+
merge_group:
2223

2324
concurrency:
2425
group: ${{ github.head_ref }}-${{ github.workflow }}

Diff for: .github/workflows/pre-commit.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- 'v*'
88
pull_request:
99
workflow_dispatch:
10+
merge_group:
1011

1112
jobs:
1213
precommit:

Diff for: .github/workflows/unit-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
merge_group:
89

910
jobs:
1011
unit-tests:

0 commit comments

Comments
 (0)