Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

autofix.yml 930B

12345678910111213141516171819202122232425262728293031323334
  1. name: autofix.ci
  2. on:
  3. workflow_call:
  4. pull_request:
  5. push:
  6. branches: [ "main" ]
  7. permissions:
  8. contents: read
  9. jobs:
  10. autofix:
  11. if: github.repository == 'langgenius/dify'
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. # Use uv to ensure we have the same ruff version in CI and locally.
  16. - uses: astral-sh/setup-uv@v6
  17. with:
  18. python-version: "3.12"
  19. - run: |
  20. cd api
  21. uv sync --dev
  22. # Fix lint errors
  23. uv run ruff check --fix-only .
  24. # Format code
  25. uv run ruff format .
  26. - name: ast-grep
  27. run: |
  28. uvx --from ast-grep-cli sg --pattern 'db.session.query($WHATEVER).filter($HERE)' --rewrite 'db.session.query($WHATEVER).where($HERE)' -l py --update-all
  29. - name: mdformat
  30. run: |
  31. uvx mdformat .
  32. - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27