Skip to content

fix(server): CLIProxyAPI updates work behind TLS-inspecting proxies #12

fix(server): CLIProxyAPI updates work behind TLS-inspecting proxies

fix(server): CLIProxyAPI updates work behind TLS-inspecting proxies #12

Workflow file for this run

name: PR Limits

Check warning on line 1 in .github/workflows/pr-limits.yml

View workflow run for this annotation

GitHub Actions / PR Limits

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
# Deterministic PR rules from CONTRIBUTING.md: the open PR limit, the conflict
# window, and the 72 hour close window that follows a triage notice.
#
# Nothing is labeled, commented on, or closed until the repository variable
# PR_LIMITS_ENFORCE is "true". Until then every run logs what it would do. A
# sweep reads the variable once when it starts; to stop one, cancel the run.
on:
pull_request_target:
types: [opened, reopened]
schedule:
- cron: "23 5 * * *"
workflow_dispatch:
inputs:
dry_run:
description: Log what the sweep would do without labeling, commenting, or closing.
type: boolean
default: true
permissions:
contents: read
issues: write
pull-requests: write
jobs:
open-limit:
name: Open PR limit
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-24.04
steps:
# pull_request_target has a write token. Load the script from the default
# branch and never run PR code. Cone mode also checks out the files beside
# .github/scripts, which is where TRIAGE_EXEMPTIONS.td and VOUCHED.td live.
- name: Checkout trusted scripts
uses: actions/checkout@v6
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
- name: Close PRs over the limit
uses: actions/github-script@v8
env:
DRY_RUN: ${{ vars.PR_LIMITS_ENFORCE != 'true' }}
with:
script: |
const limits = require("./.github/scripts/pr-limits.cjs");
await limits.enforceOpenLimit({ github, context, core, dryRun: process.env.DRY_RUN === "true" });
sweep:
name: Conflict and close windows
if: github.event_name != 'pull_request_target'
runs-on: ubuntu-24.04
concurrency:
group: pr-limits-sweep
cancel-in-progress: false
steps:
- name: Checkout trusted scripts
uses: actions/checkout@v6
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
- name: Request rebases and close what went unanswered
uses: actions/github-script@v8
env:
DRY_RUN: ${{ vars.PR_LIMITS_ENFORCE != 'true' || (github.event_name == 'workflow_dispatch' && inputs.dry_run) }}
with:
script: |
const limits = require("./.github/scripts/pr-limits.cjs");
await limits.sweep({ github, context, core, dryRun: process.env.DRY_RUN === "true" });