Skip to content

ci: add PR status labels and bump issue triage #2099

ci: add PR status labels and bump issue triage

ci: add PR status labels and bump issue triage #2099

Workflow file for this run

# Check for code formatting and license header errors using Spotless
#
# Description:
# Runs Spotless check for pull requests to ensure code formatting consistency,
# proper import ordering, and license headers.
# Fails the build if any violations are found.
#
# Deliberately has no `paths` filter: `mvn spotless:check` runs across every
# Maven module, so filtering by path would skip the job for changes it still
# validates. A module missing from such a filter (e.g. otel-plugin) can merge
# unformatted code and then break this check on unrelated pull requests.
#
# Triggers:
# - pull_request: every PR targeting main
# - push: main, to catch any formatting drift that lands
# - workflow_dispatch: manual run
name: Spotless
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
spotless-check:
# CodeBuild-hosted runner in the Java testing account (Lambda compute,
# corretto21 image with Maven preinstalled). The label must match the
# CodeBuild project name exactly. Fork PRs stay on GitHub-hosted runners so
# untrusted fork code never executes inside the testing account.
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
java-version: '17'
distribution: 'corretto'
cache: maven
- name: Run Spotless check
run: mvn -B -q spotless:check --file pom.xml