fix(review): raise checkout inspection ls-files buffer for large repos #762099
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: github activity to openclaw | |
| on: | |
| repository_dispatch: | |
| types: | |
| - github_activity | |
| issues: | |
| types: | |
| - opened | |
| - reopened | |
| - edited | |
| - closed | |
| - labeled | |
| - unlabeled | |
| - assigned | |
| - unassigned | |
| issue_comment: | |
| types: | |
| - created | |
| - edited | |
| pull_request_target: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| - converted_to_draft | |
| - edited | |
| - closed | |
| - labeled | |
| - unlabeled | |
| pull_request_review: | |
| types: | |
| - submitted | |
| - edited | |
| - dismissed | |
| pull_request_review_comment: | |
| types: | |
| - created | |
| - edited | |
| workflow_run: | |
| workflows: | |
| - sweep | |
| - repair cluster worker | |
| - repair publish cluster results | |
| - commit review | |
| types: | |
| - completed | |
| permissions: | |
| contents: write | |
| actions: read | |
| issues: read | |
| pull-requests: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| concurrency: | |
| group: >- | |
| github-activity-${{ github.event.client_payload.activity.repo || github.event.client_payload.target_repo || github.event.repository.full_name || github.repository }}-${{ github.event_name == 'workflow_run' && 'workflow-run' || format('{0}-{1}-{2}-{3}', github.event.client_payload.event_name || github.event.client_payload.activity.type || github.event_name, github.event.client_payload.action || github.event.client_payload.activity.action || github.event.action || 'activity', github.event.client_payload.comment_id || github.event.client_payload.review_comment_id || github.event.client_payload.activity.comment.id || github.event.comment.id || github.event.client_payload.activity.review.id || github.event.review.id || github.event.client_payload.activity.workflow_run.id || github.event.workflow_run.id || github.event.client_payload.activity.pull_request.number || github.event.pull_request.number || github.event.client_payload.activity.issue.number || github.event.issue.number || github.event.client_payload.activity.subject.number || github.event.client_payload.number || github.run_id, github.event.client_payload.activity.label.name || github.event.label.name || github.event.client_payload.activity.assignee.login || github.event.assignee.login || github.event.client_payload.activity.pull_request.head.sha || github.event.pull_request.head.sha || github.event.client_payload.activity.delivery_id || github.event.client_payload.delivery_id || github.event.client_payload.activity.idempotency_key || github.event.client_payload.idempotency_key || github.run_attempt) }} | |
| cancel-in-progress: true | |
| jobs: | |
| notify: | |
| if: >- | |
| ${{ | |
| !(github.event_name == 'pull_request_target' && github.event.action == 'synchronize') && | |
| !(github.event_name == 'repository_dispatch' && github.event.client_payload.activity.type == 'pull_request_target' && github.event.client_payload.activity.action == 'synchronize') && | |
| !(github.event_name == 'workflow_run' && contains(fromJSON('["success","neutral","skipped"]'), github.event.workflow_run.conclusion)) | |
| }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check core API budget | |
| id: core-budget | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| MIN_CORE_REMAINING: ${{ vars.CLAWSWEEPER_MIN_CORE_REMAINING || '250' }} | |
| run: | | |
| set -euo pipefail | |
| budget="$(gh api rate_limit --jq '[.resources.core.remaining, .resources.core.reset] | @tsv')" | |
| remaining="${budget%%$'\t'*}" | |
| reset="${budget##*$'\t'}" | |
| threshold="$MIN_CORE_REMAINING" | |
| if [ "$remaining" -lt "$threshold" ]; then | |
| reset_iso="$(date -u -d "@$reset" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || echo "$reset")" | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "::notice::Skipping noncritical GitHub activity notification; core remaining=$remaining threshold=$threshold reset=$reset_iso." | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/checkout@v7 | |
| if: steps.core-budget.outputs.skip != 'true' | |
| with: | |
| ref: ${{ github.event.repository.default_branch }} | |
| filter: blob:none | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| if: steps.core-budget.outputs.skip != 'true' | |
| with: | |
| node-version: "24" | |
| - name: Enable pinned pnpm | |
| if: steps.core-budget.outputs.skip != 'true' | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| corepack enable | |
| for attempt in 1 2 3; do | |
| if corepack prepare "pnpm@11.10.0" --activate; then | |
| exit 0 | |
| fi | |
| sleep "$((attempt * 10))" | |
| done | |
| corepack prepare "pnpm@11.10.0" --activate | |
| - name: Resolve pnpm store | |
| id: pnpm-store | |
| if: steps.core-budget.outputs.skip != 'true' | |
| shell: bash | |
| run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/cache@v6 | |
| if: steps.core-budget.outputs.skip != 'true' | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.path }} | |
| key: ${{ runner.os }}-pnpm-11.10.0-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-11.10.0- | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| if: steps.core-budget.outputs.skip != 'true' | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| for attempt in 1 2 3; do | |
| if pnpm install --frozen-lockfile; then | |
| break | |
| fi | |
| if [ "$attempt" -eq 3 ]; then | |
| exit 1 | |
| fi | |
| sleep "$((attempt * 10))" | |
| done | |
| pnpm run build:repair | |
| - name: Dispatch spam scan candidate | |
| if: steps.core-budget.outputs.skip != 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| set -euo pipefail | |
| pnpm run repair:spam-comment-intake -- --write-report | |
| - name: Feed activity to OpenClaw | |
| if: steps.core-budget.outputs.skip != 'true' | |
| env: | |
| CLAWSWEEPER_OPENCLAW_HOOK_URL: ${{ secrets.CLAWSWEEPER_OPENCLAW_HOOK_URL }} | |
| CLAWSWEEPER_OPENCLAW_HOOK_TOKEN: ${{ secrets.CLAWSWEEPER_OPENCLAW_HOOK_TOKEN }} | |
| CLAWSWEEPER_OPENCLAW_AGENT_ID: ${{ vars.CLAWSWEEPER_OPENCLAW_AGENT_ID || 'clawsweeper' }} | |
| CLAWSWEEPER_DISCORD_TARGET: ${{ vars.CLAWSWEEPER_DISCORD_TARGET }} | |
| run: | | |
| set -euo pipefail | |
| pnpm run repair:notify-github-activity -- --write-report |