Remove insecure auto-format label workflow (#20629)

This commit is contained in:
Xiaoyu Zhang
2026-03-15 21:04:29 +08:00
committed by GitHub
parent 0cff070828
commit 45dd06f4e0
2 changed files with 4 additions and 75 deletions

View File

@@ -1,71 +0,0 @@
name: Auto Format Code
on:
pull_request:
types: [labeled]
permissions:
contents: write
pull-requests: write
jobs:
auto-format:
if: github.event.label.name == 'format'
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install pre-commit hook
run: |
python -m pip install pre-commit
pre-commit install
- name: Run pre-commit to format code
run: SKIP=no-commit-to-branch pre-commit run --all-files
continue-on-error: true
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status -s) ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "🤖 Auto-format code with isort, black, ruff, and clang-format"
git push
- name: Remove format label
if: always()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'format'
});
} catch (error) {
console.log('Label may have already been removed');
}

View File

@@ -880,11 +880,11 @@ jobs:
run: |
bash scripts/ci/cuda/ci_install_dependency.sh
- name: Run benchmark smoke tests
- name: Run benchmark tests
timeout-minutes: 45
run: |
cd python/sglang/jit_kernel/benchmark
echo "Running jit-kernel benchmark smoke tests in CI mode..."
echo "Running jit-kernel benchmark tests in CI mode..."
failures=()
@@ -898,11 +898,11 @@ jobs:
done
if [ ${#failures[@]} -ne 0 ]; then
echo "The following benchmark smoke tests failed: ${failures[*]}"
echo "The following benchmark tests failed: ${failures[*]}"
exit 1
fi
echo "All jit-kernel benchmark smoke tests completed successfully!"
echo "All jit-kernel benchmark tests completed successfully!"
# =============================================== primary ====================================================