Skip to content

Commit

Permalink
CI: Add action to label development dependencies as dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Aug 2, 2024
1 parent 1c50d43 commit cd899af
Showing 1 changed file with 22 additions and 0 deletions.
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 cd899af

Please sign in to comment.