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 11, 2023
1 parent 2cbe007 commit f804877
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
dev:
- any: ['!go.mod', '!go.sum']
- '**'
- '**/.*'
- '**/.*/**'
- '**/.*/**/.*'
11 changes: 2 additions & 9 deletions .github/workflows/pr-target.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "pr-target"
on:
pull_request_target:
push:

jobs:
# label with "dev" to enable PR filtering
Expand All @@ -11,16 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: label-the-PR
if: '!contains(github.event.pull_request.labels.*.name, "dependabot")'
uses: actions/labeler@v4
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 }}

# automerge successful dependabot PRs
dependabot:
Expand Down

0 comments on commit f804877

Please sign in to comment.