mirror of
https://github.com/prdlk/leetcode.git
synced 2026-09-16 23:16:26 +00:00
ci(ci): add project set/difficulty reconciliation step to close-solved workflow
This commit is contained in:
@@ -39,3 +39,25 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
DRY_RUN: ${{ inputs.dry_run }}
|
DRY_RUN: ${{ inputs.dry_run }}
|
||||||
SRS_ADMIN_KEY: ${{ secrets.SRS_ADMIN_KEY }}
|
SRS_ADMIN_KEY: ${{ secrets.SRS_ADMIN_KEY }}
|
||||||
|
|
||||||
|
# Project fields are a projection of the issue labels, so the same push
|
||||||
|
# that adds a solution (and any issue filed since the last run) can leave
|
||||||
|
# the board's Set/Difficulty empty. Reconciling here keeps the one
|
||||||
|
# "solution landed" entry point responsible for the whole fan-out; the
|
||||||
|
# script is idempotent, so a run with nothing to do writes nothing.
|
||||||
|
#
|
||||||
|
# Needs the `project` scope, which GITHUB_TOKEN does not have — hence
|
||||||
|
# PROJECT_PAT. Unset = skip, matching SRS_ADMIN_KEY above. Best-effort by
|
||||||
|
# design: D1 and the issues are the truth, so a Project failure must not
|
||||||
|
# fail a run that already closed issues and logged the solve.
|
||||||
|
- name: Reconcile Project Set/Difficulty
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.PROJECT_PAT }}
|
||||||
|
DRY_RUN: ${{ inputs.dry_run }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GH_TOKEN" ]; then
|
||||||
|
echo "PROJECT_PAT unset — skipping the Project field reconcile"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
bun apps/cli/sync-project-fields.ts
|
||||||
|
|||||||
Reference in New Issue
Block a user