mirror of
https://github.com/prdlk/leetcode.git
synced 2026-09-16 23:16:26 +00:00
feat(ci): auto-close problem issues when a solution lands in work/
Reconciles work/ against open `problem` issues instead of diffing the push, so re-runs are no-ops and backfills need no special casing. Skips scaffolded stubs: `bun run pick` writes a statement header plus an empty body, so file existence alone must not close an issue.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: Close Solved
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ["work/**"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: Report matches without closing anything
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: close-solved
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
close:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
|
||||
# No install step: the script only uses Bun builtins + fetch.
|
||||
- run: bun scripts/close-solved.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DRY_RUN: ${{ inputs.dry_run }}
|
||||
Reference in New Issue
Block a user