This repository contains scripts to analyze linting errors from GitHub Actions and dispatch jobs to fix them using the OpenHands Cloud API.
linting_logs.txt: Raw logs from the GitHub Actions linting jobparse_linting_errors.py: Script to analyze linting errors and identify the top files and directories with errorstop_directories.txt: List of directories with the most linting errorsdispatch_linting_jobs.py: Script to dispatch jobs to fix linting errors using the OpenHands Cloud APIlinting_prompt.jinja2: Template for the prompt to fix linting errorsdispatched_jobs.json: Information about the dispatched jobs
The analysis identified the following top directories with linting errors:
- openhands/cli (113 errors)
- openhands/runtime (86 errors)
- openhands/server/routes (79 errors)
- openhands/utils (70 errors)
- openhands/server (52 errors)
- openhands/runtime/impl/remote (32 errors)
- openhands/server/session (31 errors)
- openhands/llm (31 errors)
- openhands/runtime/impl/docker (26 errors)
- openhands/runtime/impl/local (18 errors)
The top files with the most linting errors are:
- openhands/cli/tui.py (67 errors)
- openhands/runtime/action_execution_server.py (67 errors)
- openhands/runtime/impl/remote/remote_runtime.py (32 errors)
- openhands/runtime/impl/docker/docker_runtime.py (26 errors)
- openhands/llm/llm.py (24 errors)
python3 parse_linting_errors.pyThis will analyze the linting logs and output the top files and directories with linting errors.
First, set your OpenHands API key:
export OPENHANDS_API_KEY=your_api_keyThen run the script to dispatch jobs:
python3 dispatch_linting_jobs.pyThis will dispatch jobs to fix linting errors in the top 10 directories with the most errors.
- The scripts are designed to work with the OpenHands Cloud API.
- The linting prompt template is configured to fix mypy typing errors in the specified directories.
- Jobs are dispatched as draft PRs to the
feature/fix-linting-errorsbranch.