diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index b0cd652c43..4aa39e8696 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -51,6 +51,15 @@ jobs: with: files: | api/** + - name: Check dify-agent inputs + if: github.event_name != 'merge_group' + id: dify-agent-changes + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 + with: + files: | + dify-agent/**/*.py + dify-agent/pyproject.toml + dify-agent/uv.lock - if: github.event_name != 'merge_group' uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: @@ -76,6 +85,17 @@ jobs: # Format code uv run ruff format .. + - if: github.event_name != 'merge_group' && steps.dify-agent-changes.outputs.any_changed == 'true' + run: | + cd dify-agent + uv sync --dev + # fmt first to avoid line too long + uv run ruff format . + # Fix lint errors + uv run ruff check --fix . + # Format code + uv run ruff format . + - name: count migration progress if: github.event_name != 'merge_group' && steps.api-changes.outputs.any_changed == 'true' run: |