diff --git a/.github/workflows/codebase-growth-guardrails.yaml b/.github/workflows/codebase-growth-guardrails.yaml index 433c14200ae..e1549c1ee41 100644 --- a/.github/workflows/codebase-growth-guardrails.yaml +++ b/.github/workflows/codebase-growth-guardrails.yaml @@ -71,45 +71,3 @@ jobs: in the top-level onboard entrypoint. EOF exit 1 - - - name: Require Python code to be net-neutral or smaller - env: - GH_TOKEN: ${{ github.token }} - PR_NUMBER: ${{ github.event.pull_request.number }} - REPO: ${{ github.repository }} - run: | - set -euo pipefail - - rows="$(gh api --paginate "/repos/${REPO}/pulls/${PR_NUMBER}/files" \ - --jq '.[] | select((.filename | endswith(".py")) or ((.previous_filename // "") | endswith(".py"))) | [.additions, .deletions, .filename] | @tsv')" - - if [ -z "$rows" ]; then - echo "No Python files were changed." - exit 0 - fi - - additions=0 - deletions=0 - while IFS=$'\t' read -r file_additions file_deletions _file_path; do - if [ -z "${file_additions:-}" ]; then - continue - fi - additions=$((additions + file_additions)) - deletions=$((deletions + file_deletions)) - done <<< "$rows" - - net=$((additions - deletions)) - echo "Python files: +${additions}/-${deletions} (net ${net})" - - if [ "$additions" -le "$deletions" ]; then - echo "PASS: Python code is net-neutral or smaller." - exit 0 - fi - - cat <