feat : Add labeler configuration for PR auto-labeling
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 12s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 18s
PR check / Gitleaks (pull_request) Successful in 5s
PR check / lint tests (pull_request) Successful in 14s
PR check / labeler (pull_request) Successful in 3s
PR check / handle_failures (pull_request) Has been skipped
PR check / handle_success (pull_request) Successful in 1s

This commit introduces a new `.gitea/labeler.yml` file and configures a 'labeler' job to automatically apply labels to pull requests based on the changes made in the files. This enhances the efficiency of managing PRs by reducing manual intervention.
This commit is contained in:
2026-02-14 20:07:28 +01:00
parent af107ca1ee
commit ecddd28472
2 changed files with 35 additions and 0 deletions

22
.gitea/labeler.yml Normal file
View File

@@ -0,0 +1,22 @@
---
# Add 'Documentation' label to to .md files within the entire repository
# any file changes within 'docs' or 'guides' folders
Documentation:
- changed-files:
- any-glob-to-any-file:
- '**/*.md'
- docs/*
- guides/*
# Add 'source' label to any change to src and tasks files within the source dir EXCEPT for the docs sub-folder
source:
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/**/*'
- 'tasks/**/*'
- all-globs-to-all-files: '!src/docs/*'
enhancement:
- changed-files:
- any-glob-to-any-file: '.gitea/**/*'

View File

@@ -68,6 +68,19 @@ jobs:
run: |
ansible-lint
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
with:
repo-token: ${{ secrets.GITEA_TOKEN }}
configuration-path: .gitea/labeler.yml
handle_failures:
runs-on: ubuntu-latest
needs: [leak_test, lint_test]