Skip to content

Commit

Permalink
Add action to assign label "dev-dependencies" to Dependabot PR's
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Jan 5, 2023
1 parent 42791d0 commit be7a11a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories:
- 'dependencies'
exclude-labels:
- 'DevOps'
- 'dev-dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/post-dependabot-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot Pull Request
on: pull_request_target
jobs:
build:
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@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add dev-dependencies label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.dependabot-metadata.outputs.dependency-type == 'direct:development' }}
with:
labels: dev-dependencies
- name: Remove dependencies label
uses: actions-ecosystem/action-remove-labels@v1
if: ${{ steps.dependabot-metadata.outputs.dependency-type == 'direct:development' }}
with:
labels: dependencies

0 comments on commit be7a11a

Please sign in to comment.