Skip to content

chore: add auto-fix GitHub Action for formatting and docs#2232

Closed
benfdking wants to merge 2 commits intomainfrom
feat/autofix-github-action
Closed

chore: add auto-fix GitHub Action for formatting and docs#2232
benfdking wants to merge 2 commits intomainfrom
feat/autofix-github-action

Conversation

@benfdking
Copy link
Copy Markdown
Collaborator

Summary

  • Add a GitHub Action that automatically fixes formatting issues and regenerates docs on PRs
  • Add Bazel targets (prettier_fix, ruff_fix, codegen_docs_fix) tagged with autofix
  • Use @rules_rust//:rustfmt for Rust formatting

Usage

Run all fixes locally:

bazel run @rules_rust//:rustfmt
bazel query 'attr(tags, autofix, //...)' | xargs -L1 bazel run

Or run individually:

bazel run @rules_rust//:rustfmt      # Rust formatting
bazel run //:prettier_fix            # Prettier formatting
bazel run //:ruff_fix                # Python ruff formatting
bazel run //:codegen_docs_fix        # Regenerate docs

Test plan

  • Tested bazel run @rules_rust//:rustfmt with intentional formatting error
  • Tested bazel run //:prettier_fix with intentional formatting error
  • Tested bazel run //:ruff_fix with intentional formatting error
  • Tested bazel run //:codegen_docs_fix with modified docs

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark for ef75b58

Click to view benchmark
Test Base PR %
DepthMap::from_parent 51.6±0.69µs 52.5±2.61µs +1.74%
fix_complex_query 12.3±0.09ms 12.7±1.13ms +3.25%
fix_superlong 195.5±11.93ms 203.8±8.19ms +4.25%
parse_complex_query 4.2±0.04µs 4.2±0.03µs 0.00%
parse_expression_recursion 7.3±0.10µs 7.3±0.09µs 0.00%
parse_simple_query 1084.0±11.39ns 1089.1±16.79ns +0.47%

@benfdking benfdking force-pushed the feat/autofix-github-action branch 3 times, most recently from 3a9b0f1 to da97b5c Compare January 28, 2026 21:31
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark for 9c1f5ec

Click to view benchmark
Test Base PR %
DepthMap::from_parent 52.9±1.94µs 53.3±2.03µs +0.76%
fix_complex_query 12.4±0.38ms 12.6±0.46ms +1.61%
fix_superlong 182.2±8.13ms 179.5±7.24ms -1.48%
parse_complex_query 4.1±0.07µs 4.2±0.04µs +2.44%
parse_expression_recursion 7.3±0.11µs 7.2±0.07µs -1.37%
parse_simple_query 1077.0±105.71ns 1085.2±15.63ns +0.76%

@openhands-ai
Copy link
Copy Markdown

openhands-ai Bot commented Jan 29, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Auto-fix

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #2232 at branch `feat/autofix-github-action`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

benfdking and others added 2 commits January 29, 2026 22:34
Add a GitHub Action that automatically fixes formatting issues and
regenerates docs on PRs. This includes:

- New autofix workflow that runs on PR open/sync
- Bazel targets for fixing: prettier_fix, ruff_fix, codegen_docs_fix
- All fix targets tagged with 'autofix' for easy discovery
- rustfmt via @rules_rust//:rustfmt

Usage locally:
  bazel run @rules_rust//:rustfmt
  bazel query 'attr(tags, autofix, //...)' | xargs -L1 bazel run

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Bazel sh_binary targets don't have access to external tools (cargo, pnpm, uv)
in the sandbox. Using make fix directly is simpler and works both locally
and in CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@benfdking benfdking force-pushed the feat/autofix-github-action branch from da97b5c to a33b70f Compare January 29, 2026 22:48
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark for 849b36e

Click to view benchmark
Test Base PR %
DepthMap::from_parent 52.9±0.72µs 52.5±1.59µs -0.76%
fix_complex_query 12.7±0.29ms 12.8±0.37ms +0.79%
fix_superlong 202.7±21.23ms 225.5±23.58ms +11.25%
parse_complex_query 4.2±0.07µs 4.2±0.09µs 0.00%
parse_expression_recursion 7.2±0.11µs 7.4±0.16µs +2.78%
parse_simple_query 1064.2±18.23ns 1066.2±20.69ns +0.19%

@benfdking benfdking closed this Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant