Skip to content

Commit 2736e3a

Browse files
Remove auto-commit functionality from CI
Since developers should run pre-commit hooks locally (which now includes ruff format), there's no need for CI to auto-commit formatting changes. The CI should simply validate that code is properly formatted, not fix it automatically. This follows the principle that pre-commit hooks should be run locally by developers before pushing, making the workflow cleaner and more predictable. Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 723b45d commit 2736e3a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

.github/workflows/precommit.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@ on:
77
pull_request:
88
branches: ["**"]
99

10-
permissions:
11-
contents: write
12-
pull-requests: write
13-
1410
jobs:
1511
pre-commit:
1612
runs-on: ubuntu-latest
1713

1814
steps:
1915
- name: Checkout code
2016
uses: actions/checkout@v4
21-
with:
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
fetch-depth: 0
2417

2518
- name: Set up Python
2619
uses: actions/setup-python@v5
@@ -37,10 +30,3 @@ jobs:
3730
uses: pre-commit/action@v3.0.1
3831
with:
3932
extra_args: --all-files
40-
41-
- name: Auto-commit formatting changes
42-
if: failure()
43-
uses: stefanzweifel/git-auto-commit-action@v5
44-
with:
45-
commit_message: "Auto-format code with ruff\n\nCo-authored-by: openhands <openhands@all-hands.dev>"
46-
file_pattern: "*.py"

0 commit comments

Comments
 (0)