Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions #97

Potential fix for code scanning alert no. 3: Workflow does not contain permissions

Potential fix for code scanning alert no. 3: Workflow does not contain permissions #97

Workflow file for this run

name: PR review
on:
pull_request_target:
paths-ignore:
- '**/dependabot.yml'
- '.editorconfig'
- '**/.gitignore'
- '**/.gitattributes'
- '**.md'
- 'LICENSE'
jobs:
review:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: astral-sh/setup-uv@v7
with:
version: '0.9.5'
cache-dependency-glob: |
./pyproject.toml
- name: Install prerequisites
run: |
uv python install 3.12
uv venv --python-preference only-managed
uv pip install -r pyproject.toml
uv pip install mypy
- name: Mypy review
id: mypy
uses: tsuyoshicho/action-mypy@v5
with:
reporter: github-pr-review
level: warning
target: src/lxml-stubs
fail_on_error: true
setup_method: nothing
install_types: false
output_json: true
execute_command: .venv/bin/mypy
# Action doesn't support --pythonpath, smuggle it
# through misc flags
- name: Pyright review
id: pyright
if: success() || steps.mypy.conclusion == 'failure'
uses: jordemort/action-pyright@v1
with:
reporter: github-pr-review
level: warning
fail_on_error: true
pyright_flags: --pythonpath .venv/bin/python3 src