diff --git a/.github/labeler-config-srvaroa.yml b/.github/labeler-config-srvaroa.yml index ab370b6e2..177a35f06 100644 --- a/.github/labeler-config-srvaroa.yml +++ b/.github/labeler-config-srvaroa.yml @@ -67,6 +67,8 @@ labels: - 'app/core/src/main/java/stirling/software/SPDF/UI/.*' - 'app/proprietary/src/main/java/stirling/software/proprietary/security/controller/web/.*' - 'frontend/**' + - 'frontend/.*' + - 'frontend/**/.*' - label: 'Tauri' files: diff --git a/.github/workflows/frontend-backend-licenses-update.yml b/.github/workflows/frontend-backend-licenses-update.yml index 2e6b84b03..511dbd53a 100644 --- a/.github/workflows/frontend-backend-licenses-update.yml +++ b/.github/workflows/frontend-backend-licenses-update.yml @@ -60,7 +60,7 @@ jobs: persist-credentials: false - name: Setup GitHub App Bot - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) + if: (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)) && github.actor != 'dependabot[bot]' id: setup-bot uses: ./.github/actions/setup-bot with: @@ -134,7 +134,7 @@ jobs: # PR Event: Check licenses and comment on PR - name: Delete previous license check comments - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: github-token: ${{ steps.setup-bot.outputs.token }} @@ -167,7 +167,7 @@ jobs: } - name: Summarize results (fork PRs) - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true) || github.actor == 'dependabot[bot]' run: | { echo "## Frontend License Check" @@ -187,7 +187,7 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" - name: Comment on PR - License Check Results - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: github-token: ${{ steps.setup-bot.outputs.token }} @@ -208,9 +208,9 @@ jobs: } catch (e) { warningDetails = 'Unable to read warning details'; } - + commentBody = `## ❌ Frontend License Check Failed - + The frontend license check has detected compatibility warnings that require review: ${warningDetails} @@ -220,7 +220,7 @@ jobs: _This check will fail the PR until license issues are resolved._`; } else { commentBody = `## ✅ Frontend License Check Passed - + All frontend licenses have been validated and no compatibility warnings were detected. The frontend license report has been updated successfully.`; @@ -323,7 +323,7 @@ jobs: persist-credentials: false - name: Setup GitHub App Bot - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) + if: (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)) && github.actor != 'dependabot[bot]' id: setup-bot uses: ./.github/actions/setup-bot with: @@ -368,7 +368,7 @@ jobs: cp build/reports/dependency-license/index.json app/core/src/main/resources/static/3rdPartyLicenses.json - name: Delete previous backend license check comments - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: github-token: ${{ steps.setup-bot.outputs.token }} @@ -398,7 +398,7 @@ jobs: } - name: Comment on PR - Backend License Check Results - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: github-token: ${{ steps.setup-bot.outputs.token }} @@ -424,7 +424,7 @@ jobs: let commentBody; if (hasWarnings) { commentBody = `## ❌ Backend License Check Failed - + The backend license check has detected dependencies with incompatible or unallowed licenses: ${warningDetails || 'See uploaded artifact for details.'} @@ -434,9 +434,9 @@ jobs: _This check will fail the PR until license issues are resolved._`; } else { commentBody = `## ✅ Backend License Check Passed - + All backend dependencies have valid and allowed licenses. - + The backend license report has been updated successfully.`; } @@ -464,9 +464,16 @@ jobs: - name: Prepare PR body (push only) if: github.event_name == 'push' && env.CHANGES_DETECTED == 'true' run: | - PR_BODY="Auto-generated by ${{ steps.setup-bot.outputs.app-slug }}[bot]\n\nThis PR updates the backend license report based on dependency changes." + PR_BODY="Auto-generated by ${{ steps.setup-bot.outputs.app-slug }}[bot] + + This PR updates the backend license report based on dependency changes." + if [ "${{ env.LICENSE_WARNINGS_EXIST }}" = "true" ]; then - PR_BODY="$PR_BODY\n\n## ⚠️ License Compatibility Warnings\n\nIncompatible licenses detected – manual review required before merge." + PR_BODY="$PR_BODY + + ## ⚠️ License Compatibility Warnings + + Incompatible licenses detected – manual review required before merge." fi echo "PR_BODY<> $GITHUB_ENV echo "$PR_BODY" >> $GITHUB_ENV