Skip to content

feat: add labeler action #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Label PRs based on modified file paths (v5 format)
# https://github.com/actions/labeler

# General documentation

documentation:
- changed-files:
- any-glob-to-any-file:
- 'content/**'
- 'assets/**'
- 'static/**'
- 'data/**'

# Product labels

product/agent:
- changed-files:
- any-glob-to-any-file:
- 'content/agent/**'
- 'content/includes/agent/**'

product/amplify:
- changed-files:
- any-glob-to-any-file: 'content/amplify/**'

product/controller:
- changed-files:
- any-glob-to-any-file:
- 'content/controller/**'
- 'content/includes/controller/**'

product/mesh:
- changed-files:
- any-glob-to-any-file: 'content/mesh/**'

product/modsec-waf:
- changed-files:
- any-glob-to-any-file: 'content/modsec-waf/**'

product/nap-dos:
- changed-files:
- any-glob-to-any-file:
- 'content/nap-dos/**'
- 'content/includes/nap-dos/**'

product/nap-waf:
- changed-files:
- any-glob-to-any-file:
- 'content/nap-waf/**'
- 'content/includes/nap-waf/**'

product/ngf:
- changed-files:
- any-glob-to-any-file:
- 'content/ngf/**'
- 'content/includes/ngf/**'

product/nginx-plus:
- changed-files:
- any-glob-to-any-file:
- 'content/nginx/**'
- 'content/includes/nginx-plus/**'

product/nginx-one:
- changed-files:
- any-glob-to-any-file:
- 'content/nginx-one/**'
- 'content/includes/nginx-one/**'

product/nginxaas:
- changed-files:
- any-glob-to-any-file:
- 'content/nginxaas-azure/**'
- 'content/includes/nginxaas-azure/**'

product/nim:
- changed-files:
- any-glob-to-any-file:
- 'content/nim/**'
- 'content/includes/nim/**'

product/nms:
- changed-files:
- any-glob-to-any-file:
- 'content/nms/**'
- 'content/includes/nms/**'

product/unit:
- changed-files:
- any-glob-to-any-file:
- 'content/unit/**'
- 'content/includes/unit/**'

# Other labels

process documentation:
- changed-files:
- any-glob-to-any-file:
- 'templates/**'
- '*.md'
- 'LICENSE'

tooling:
- changed-files:
- any-glob-to-any-file:
- 'layouts/**'
- '.github/**'
- '.cloudcannon/**'
- 'styles/**'
- 'layouts/**'
- 'config/**'
- 'archetypes/**'
- '*.yml'
- '*.yaml'
- '*.json'
- '*.ts'
- '*.sh'
- '*.js'
- 'Makefile'
- '.vale.ini'
- '.gitignore'
- '.gitattributes'
18 changes: 18 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR Labeler

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read # Required to read the labeler.yml file
pull-requests: write # Required to apply labels to PRs

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Apply labels based on file paths
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"