Skip to content

Commit

Permalink
Merge pull request #605 from LeonLuttenberger/wip/dependabot-config
Browse files Browse the repository at this point in the history
chore: Configure dependabot
  • Loading branch information
dgraeber authored Jun 5, 2024
2 parents b98e215 + 2caa187 commit cb8dcc6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
production-dependencies:
dependency-type: "production"
development-dependencies:
dependency-type: "development"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns:
- "*"
26 changes: 26 additions & 0 deletions .github/workflows/dependabot-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot Pull Request Metadata
on: pull_request_target

jobs:
build:
permissions:
pull-requests: read

runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}

steps:
- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
alert-lookup: true
compat-lookup: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Add a label for all PRs with an alert state
if: ${{ steps.dependabot-metadata.outputs.alert-state != '' }}
run: gh pr edit "$PR_URL" --add-label "vulnerability"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit cb8dcc6

Please sign in to comment.