Skip to content

Commit

Permalink
feat: configure dependabot
Browse files Browse the repository at this point in the history
remove configuration for release branches, keep config
only for main branch.
Reduce number of PRs to max 3.
Enable grouping of dependencies to a single PR.
Add release-note-none label

Signed-off-by: Karel Simon <[email protected]>
  • Loading branch information
ksimon1 committed Jan 17, 2024
1 parent 5221624 commit 36c0a59
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,18 @@ updates:
interval: "daily"
allow:
- dependency-type: "all"
- package-ecosystem: "gomod"
directory: "/"
target-branch: "release-v0.3"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
- package-ecosystem: "gomod"
directory: "/"
target-branch: "release-v0.2"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
- package-ecosystem: "gomod"
directory: "/"
target-branch: "release-v0.1"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
groups:
production-dependencies:
dependency-type: "production"
development-dependencies:
dependency-type: "development"
open-pull-requests-limit: 3
labels:
- "release-note-none"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 3
labels:
- "release-note-none"
18 changes: 18 additions & 0 deletions .github/workflows/dependabot-ok-to-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add ok-to-test label for dependabot PRs
on: pull_request
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
# fetch informations about PR
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#label-a-pull-request
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add a label ok-to-test to dependabot PRs
run: gh pr edit "$PR_URL" --add-label "ok-to-test"
env:
PR_URL: ${{github.event.pull_request.html_url}}

0 comments on commit 36c0a59

Please sign in to comment.