mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Its job id was `test`, the same check-run name test-mcp.yml publishes and guard-internal-staging requires, so a commit touching the sweep carried two check runs called `test`. Renaming it to `sweep-tests` leaves the required context with exactly one job behind it.
69 lines
2 KiB
YAML
69 lines
2 KiB
YAML
name: Auto-close duplicate issues
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 9 * * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: Log which issues would close without closing anything
|
|
type: boolean
|
|
default: true
|
|
grace_period_days:
|
|
description: Days a duplicate notice must go unanswered before the close
|
|
type: number
|
|
default: 3
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/auto-close-duplicates.yml
|
|
- scripts/auto-close-duplicates.ts
|
|
- scripts/auto-close-duplicates.test.ts
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
sweep-tests:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
bun-version: "1.4.0"
|
|
|
|
- name: Test the sweep
|
|
run: bun test scripts/auto-close-duplicates.test.ts
|
|
|
|
sweep:
|
|
if: github.event_name != 'pull_request' && github.repository == 'BerriAI/litellm'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
# Exact version, never latest: the next step holds an issues: write token
|
|
bun-version: "1.4.0"
|
|
|
|
- name: Close unanswered duplicates, reopen ones the reporter answered
|
|
run: bun run scripts/auto-close-duplicates.ts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
DRY_RUN: ${{ inputs.dry_run == true }}
|
|
GRACE_PERIOD_DAYS: ${{ inputs.grace_period_days }}
|