diff --git a/.github/labeler-config-srvaroa.yml b/.github/labeler-config-srvaroa.yml new file mode 100644 index 000000000..9bb02d7d7 --- /dev/null +++ b/.github/labeler-config-srvaroa.yml @@ -0,0 +1,136 @@ +version: 1 +labels: + + - label: "Bugfix" + title: '^fix:.*' + + - label: "enhancement" + title: '^feat:.*' + + - label: "build" + title: '^build:.*' + + - label: "chore" + title: '^chore:.*' + + - label: "ci" + title: '^ci:.*' + + - label: "perf" + title: '^perf:.*' + + - label: "refactor" + title: '^refactor:.*' + + - label: "revert" + title: '^revert:.*' + + - label: "style" + title: '^style:.*' + + - label: 'API' + title: '.*openapi.*' + + - label: 'Translation' + files: + - 'stirling-pdf/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}.properties' + - 'scripts/ignore_translation.toml' + - 'stirling-pdf/src/main/resources/templates/fragments/languages.html' + - '.github/scripts/check_language_properties.py' + + - label: 'Front End' + files: + - 'stirling-pdf/src/main/resources/templates/**/*' + - 'proprietary/src/main/resources/templates/**/*' + - 'stirling-pdf/src/main/resources/static/**/*' + - 'proprietary/src/main/resources/static/**/*' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/**/*' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/UI/**/*' + + - label: 'Java' + files: + - 'common/src/main/java/**/*.java' + - 'proprietary/src/main/java/**/*.java' + - 'stirling-pdf/src/main/java/**/*.java' + + - label: 'Back End' + files: + - 'stirling-pdf/src/main/java/stirling/software/SPDF/config/**/*' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/**/*' + - 'stirling-pdf/src/main/resources/settings.yml.template' + - 'stirling-pdf/src/main/resources/application.properties' + - 'stirling-pdf/src/main/resources/banner.txt' + - 'scripts/png_to_webp.py' + - 'split_photos.py' + + - label: 'Security' + files: + - 'proprietary/src/main/java/stirling/software/proprietary/security/**/*' + - 'scripts/download-security-jar.sh' + - '.github/workflows/dependency-review.yml' + - '.github/workflows/scorecards.yml' + + - label: 'API' + files: + - 'stirling-pdf/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/**/*' + - 'stirling-pdf/src/main/java/stirling/software/SPDF/model/api/**/*' + - 'scripts/png_to_webp.py' + - 'split_photos.py' + - '.github/workflows/swagger.yml' + + - label: 'Documentation' + files: + - '**/*.md' + - 'scripts/counter_translation.py' + - 'scripts/ignore_translation.toml' + title: '^docs:.*' + + - label: 'Docker' + files: + - '.github/workflows/build.yml' + - '.github/workflows/push-docker.yml' + - 'Dockerfile' + - 'Dockerfile.fat' + - 'Dockerfile.ultra-lite' + - 'exampleYmlFiles/*.yml' + - 'scripts/download-security-jar.sh' + - 'scripts/init.sh' + - 'scripts/init-without-ocr.sh' + - 'scripts/installFonts.sh' + - 'test.sh' + - 'test2.sh' + + - label: 'Devtools' + files: + - '.devcontainer/**/*' + - 'Dockerfile.dev' + - '.vscode/**/*' + - '.editorconfig' + - '.pre-commit-config' + - '.github/workflows/pre_commit.yml' + - 'HowToAddNewLanguage.md' + + - label: 'Test' + files: + - 'common/src/test/**/*' + - 'proprietary/src/test/**/*' + - 'stirling-pdf/src/test/**/*' + - 'testing/**/*' + - '.github/workflows/scorecards.yml' + + - label: 'Github' + files: + - '.github/**/*' + + - label: 'Gradle' + files: + - 'gradle/**/*' + - 'gradlew' + - 'gradlew.bat' + - 'settings.gradle' + - 'build.gradle' + - 'common/build.gradle' + - 'proprietary/build.gradle' + - 'stirling-pdf/build.gradle' diff --git a/.github/labels.yml b/.github/labels.yml index f4e077f0a..3a5973003 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -111,3 +111,30 @@ - name: "Devtools" color: "FF9E1F" description: "Development tools" +- name: "Bugfix" + color: "FF9E1F" + description: "Pull requests that fix bugs" +- name: "Gradle" + color: "FF9E1F" + description: "Pull requests that update Gradle code" +- name: "build" + color: "1E90FF" + description: "Changes that affect the build system or external dependencies" +- name: "chore" + color: "FFD700" + description: "Routine tasks or maintenance that don't modify src or test files" +- name: "ci" + color: "4682B4" + description: "Changes to CI configuration files and scripts" +- name: "perf" + color: "FF69B4" + description: "Changes that improve performance" +- name: "refactor" + color: "9932CC" + description: "Code changes that neither fix a bug nor add a feature" +- name: "revert" + color: "DC143C" + description: "Reverts a previous commit" +- name: "style" + color: "FFA500" + description: "Changes that do not affect the meaning of the code (formatting, etc.)" \ No newline at end of file diff --git a/.github/workflows/auto-labelerV2.yml b/.github/workflows/auto-labelerV2.yml new file mode 100644 index 000000000..dec73ddac --- /dev/null +++ b/.github/workflows/auto-labelerV2.yml @@ -0,0 +1,35 @@ +name: "Auto Pull Request Labeler V2" +on: + pull_request_target: + types: [opened, synchronize] + +permissions: + contents: read + +jobs: + labeler: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Harden Runner + uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 + with: + egress-policy: audit + + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup GitHub App Bot + id: setup-bot + uses: ./.github/actions/setup-bot + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} + + - uses: srvaroa/labeler@0a20eccb8c94a1ee0bed5f16859aece1c45c3e55 # v1.13.0 + with: + config_path: .github/labeler-config-srvaroa.yml + use_local_config: false + fail_on_error: true + env: + GITHUB_TOKEN: "${{ steps.setup-bot.outputs.token }}"