π OpenHands: AI-Driven Development
Fix issue #5337: [Bug]: lint-fix workflow is failing frontend and python steps (#5338)
OpenHands6ee9028d4aa2
diff --git a/.github/workflows/lint-fix.yml b/.github/workflows/lint-fix.ymlindex 9fa97eaaf2..dca35010fb 100644--- a/.github/workflows/lint-fix.yml+++ b/.github/workflows/lint-fix.yml@@ -5,9 +5,10 @@ on:types: [labeled]jobs:- lint-fix:+ # Frontend lint fixes+ lint-fix-frontend:if: github.event.label.name == 'lint-fix'- name: Fix linting issues+ name: Fix frontend linting issuesruns-on: ubuntu-latestpermissions:contents: write@@ -20,7 +21,6 @@ jobs:fetch-depth: 0token: ${{ secrets.GITHUB_TOKEN }}- # Frontend lint fixes- name: Install Node.js 20uses: actions/setup-node@v4with:@@ -34,7 +34,36 @@ jobs:cd frontendnpm run lint:fix- # Python lint fixes+ # Commit and push changes if any+ - name: Check for changes+ id: git-check+ run: |+ git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT+ - name: Commit and push if there are changes+ if: steps.git-check.outputs.changes == 'true'+ run: |+ git config --local user.email "[email protected]"+ git config --local user.name "OpenHands Bot"+ git add -A+ git commit -m "π€ Auto-fix frontend linting issues"+ git push++ # Python lint fixes+ lint-fix-python:+ if: github.event.label.name == 'lint-fix'+ name: Fix Python linting issues+ runs-on: ubuntu-latest+ permissions:+ contents: write+ pull-requests: write+ steps:+ - uses: actions/checkout@v4+ with:+ ref: ${{ github.head_ref }}+ repository: ${{ github.event.pull_request.head.repo.full_name }}+ fetch-depth: 0+ token: ${{ secrets.GITHUB_TOKEN }}+- name: Set up pythonuses: actions/setup-python@v5with:@@ -58,5 +87,5 @@ jobs:git config --local user.email "[email protected]"git config --local user.name "OpenHands Bot"git add -A- git commit -m "π€ Auto-fix linting issues"+ git commit -m "π€ Auto-fix Python linting issues"git push