Skip to content

Commit

Permalink
port labeler changes over from OpenNMS/opennms
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Jun 21, 2023
1 parent 24085e9 commit 389023d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/assign-by-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
- Bonrob2

"docs/**/*":
- Bonrob2
- Bonrob2

".circleci/**/*":
- RangerRick
- mershad-manesh
4 changes: 0 additions & 4 deletions .github/label-pr.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs:
- 'docs/*'
- 'docs/**/*'
- '**/*.adoc'
6 changes: 3 additions & 3 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Auto Assign Pull Request"
on:
pull_request:
types: [review_requested, ready_for_review, opened, synchronize, reopened]
# types: [review_requested, ready_for_review, opened, synchronize, reopened]
branches:
- develop
- master
Expand All @@ -10,7 +10,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: shufo/[email protected].3
- uses: shufo/[email protected].4
with:
config: ".github/assign-by-files.yml"
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 10 additions & 10 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Workflow to associate labels automatically
name: PR-Labeler
# Trigger the workflow on pull request events
on: [pull_request]
on:
- pull_request_target

jobs:
label:
runs-on: ubuntu-18.04
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
# We need to checkout the repository to access the configured file (.github/label-pr.yml)
- uses: actions/checkout@v2
- name: Labeler
uses: docker://decathlon/pull-request-labeler-action:2.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml`
CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 389023d

Please sign in to comment.