Skip to content

ci: run autofix before main CI on pull requests#38394

Open
ojasarora77 wants to merge 1 commit into
langgenius:mainfrom
ojasarora77:ci/run-autofix-before-main-ci
Open

ci: run autofix before main CI on pull requests#38394
ojasarora77 wants to merge 1 commit into
langgenius:mainfrom
ojasarora77:ci/run-autofix-before-main-ci

Conversation

@ojasarora77

Copy link
Copy Markdown
Contributor

Fixes #38291

Summary

Runs autofix.ci as the first job in main-ci.yml for pull requests, so downstream tests and style checks run against autofixed code instead of racing with a separate autofix workflow.

  • Add a run-autofix job to main-ci.yml that calls autofix.yml via workflow_call
  • Gate pre_job (and the rest of the pipeline) on autofix completing
  • Remove the standalone pull_request trigger from autofix.yml to prevent parallel runs
  • Keep push and merge_group triggers on autofix.yml unchanged

This uses a reusable workflow call rather than workflow_run so child workflows continue to check out the PR head normally without extra ref plumbing.

From Cursor

Test plan

  • Open a PR with a deliberate ruff formatting issue and confirm autofix runs before API/Web tests
  • Confirm merge group and push-to-main CI still run without waiting on autofix
  • Confirm a PR that needs no autofix changes still completes the full pipeline after the autofix job

Call autofix.ci as the first job in main-ci.yml for pull_request events
so formatting fixes land before tests and style checks run. Remove the
standalone pull_request trigger from autofix.yml to avoid parallel runs.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run autofix first in ci

1 participant