Chore(deps): bump actions/cache from 5 to 6 #3870
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: Agent Review Policy | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review, edited, labeled, unlabeled, converted_to_draft] | |
| merge_group: | |
| permissions: | |
| actions: read | |
| pull-requests: read | |
| contents: read | |
| jobs: | |
| agent-review-policy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: ${{ github.repository }} | |
| ref: ${{ github.event.pull_request.base.sha || github.sha }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Node dependencies | |
| if: github.event_name == 'pull_request_target' | |
| run: npm ci --ignore-scripts | |
| - name: Build TypeScript utilities | |
| if: github.event_name == 'pull_request_target' | |
| run: node tools/npm/run-script.mjs build | |
| - name: Evaluate Copilot queue gate | |
| if: > | |
| always() && ( | |
| github.event_name == 'pull_request_target' || | |
| github.event_name == 'merge_group' | |
| ) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| shell: bash | |
| run: | | |
| review_strategy="$(node -e "const fs=require('fs'); const path=require('path'); const policyPath=path.join(process.cwd(),'tools','priority','delivery-agent.policy.json'); const policy=JSON.parse(fs.readFileSync(policyPath,'utf8')); process.stdout.write(policy.copilotReviewStrategy || 'github-review-required');")" | |
| args=( | |
| "tools/priority/copilot-review-gate.mjs" | |
| "--event-name" "${{ github.event_name }}" | |
| "--repo" "${{ github.repository }}" | |
| "--copilot-review-strategy" "$review_strategy" | |
| "--poll-attempts" "60" | |
| "--poll-delay-ms" "10000" | |
| "--out" "tests/results/_agent/reviews/copilot-review-gate.json" | |
| "--step-summary" "$GITHUB_STEP_SUMMARY" | |
| ) | |
| if [[ "${{ github.event_name }}" == "merge_group" ]]; then | |
| args+=( | |
| "--head-sha" "${{ github.sha }}" | |
| "--head-branch" "${{ github.event.merge_group.head_ref || github.ref_name }}" | |
| "--base-ref" "${{ github.event.merge_group.base_ref }}" | |
| ) | |
| else | |
| args+=( | |
| "--pr" "${{ github.event.pull_request.number }}" | |
| "--head-sha" "${{ github.event.pull_request.head.sha }}" | |
| "--base-ref" "${{ github.event.pull_request.base.ref }}" | |
| "--draft" "${{ github.event.pull_request.draft }}" | |
| ) | |
| fi | |
| node "${args[@]}" | |
| - name: Upload Copilot queue gate artifact | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: copilot-review-gate-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: tests/results/_agent/reviews/copilot-review-gate.json | |
| if-no-files-found: error |