Skip to content

Commit

Permalink
feat: set special labels to dependabot PRs
Browse files Browse the repository at this point in the history
Set release-note-none and ok-to-test labels to
prs which were created by dependabot

Signed-off-by: Karel Simon <[email protected]>
  • Loading branch information
ksimon1 committed Jan 16, 2024
1 parent a6dec99 commit 9cd60d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ updates:
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 9cd60d0

Please sign in to comment.