diff --git a/.gitea/labeler.yml b/.gitea/labeler.yml new file mode 100644 index 0000000..f5c868e --- /dev/null +++ b/.gitea/labeler.yml @@ -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/**/*' diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index b559c00..67d3b45 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -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]