feat(validator): redistribute ineligible repo emissions to eligible repos #2787
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| pull_request: | |
| branches: [main, test] | |
| env: | |
| PYTHON_VERSION: "3.12" | |
| jobs: | |
| # If PR is from the same repo, auto-commit lint fixes | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - uses: astral-sh/setup-uv@v4 | |
| - run: uv python install ${{ env.PYTHON_VERSION }} | |
| - run: uv sync --extra dev | |
| - name: Run pre-commit with auto-fixes | |
| run: uv run pre-commit run --all-files || true | |
| - uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "style: auto-format with pre-commit" | |
| - name: Re-run pre-commit to verify clean | |
| run: uv run pre-commit run --all-files | |
| - name: Run pre-push checks (pyright, vulture) | |
| run: SKIP=pytest uv run pre-commit run --all-files --hook-stage pre-push | |
| # If PR is from a fork, fail on any diff | |
| pre-commit-fork: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.head.repo.full_name != github.repository | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - uses: astral-sh/setup-uv@v4 | |
| - run: uv python install ${{ env.PYTHON_VERSION }} | |
| - run: uv sync --extra dev | |
| - name: Run pre-commit checks | |
| run: uv run pre-commit run --all-files --show-diff-on-failure | |
| - name: Run pre-push checks (pyright, vulture) | |
| run: SKIP=pytest uv run pre-commit run --all-files --hook-stage pre-push |