Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Attach dev label only to PRs not done by dependabot.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauravuo committed Sep 7, 2023
1 parent b6ce726 commit d9c26be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .github/labeler.yml

This file was deleted.

21 changes: 8 additions & 13 deletions .github/workflows/pr-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@ on:
jobs:
# label with "dev" to enable PR filtering
label:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- id: label-the-PR
uses: actions/labeler@v4
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.9
- name: add label
id: add-labels
if: !contains(steps.pr-labels.outputs.labels, 'dependabot')
uses: actions-ecosystem/action-add-labels@v1
with:
repo-token: "${{ secrets.RELEASER_PAT }}"
- id: add-comment
if: contains(steps.label-the-PR.outputs.all-labels, 'dev') && !contains(steps.label-the-PR.outputs.all-labels, 'github_actions')
run: gh pr comment $PR --body "PR created by $USER"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}
USER: ${{ github.event.pull_request.user.login }}
labels: dev

# automerge successful dependabot PRs
dependabot:
Expand Down

0 comments on commit d9c26be

Please sign in to comment.