Conversation
- Add explicit `permissions: pull-requests: write` so the job won't 403 on read-only default tokens.
- Replace hardcoded `jdx/mise` with `${{ github.repository }}` (via REPO env).
- Filter stale PRs server-side via `--search "updated:<CUTOFF -author:jdx -label:keep-open sort:updated-asc"` and bump `--limit` to 500. Only stale candidates are fetched, sorted oldest-first, and any beyond the limit roll into the next daily run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummaryThis PR hardens the stale-PR-closer workflow by adding an explicit Confidence Score: 4/5Safe to merge — only one P2 style note about a sort qualifier that degrades gracefully. All changes are straightforward CI hardening with no logic regressions. The only finding is a P2: sort:updated-asc embedded in the --search string is likely ignored by the GitHub API, meaning PRs are closed in an unspecified order rather than oldest-first. This does not affect correctness. .github/workflows/pr-closer.yml — minor sort-qualifier concern on line 20. Important Files Changed
Reviews (1): Last reviewed commit: "chore(ci): improve pr-closer workflow" | Re-trigger Greptile |
| ([.labels[].name] | index("keep-open") | not) | ||
| ) | [.number, (if (.statusCheckRollup | length > 0) and ([.statusCheckRollup[].conclusion] | index("FAILURE") or index("failure")) then "failing" else "passing" end)] | @tsv' | \ | ||
| CUTOFF=$(date -u -d '30 days ago' +%Y-%m-%d) | ||
| gh pr list -R "$REPO" --state open --search "updated:<$CUTOFF -author:jdx -label:keep-open sort:updated-asc" --json number,statusCheckRollup --limit 500 | \ |
There was a problem hiding this comment.
sort:updated-asc may be silently ignored
The sort:updated-asc qualifier is embedded in the --search string, but GitHub's search API treats sort and order as separate query parameters, not inline search qualifiers. The gh pr list CLI does not appear to extract and re-map sort: tokens from the --search string, so this term is likely passed as a literal keyword and silently produces no effect. Closing PRs in unspecified order is harmless here (oldest-first is a nice-to-have, not a correctness requirement), but if ordered processing is important the --sort updated --order asc flags on gh pr list would be the reliable alternative.
| gh pr list -R "$REPO" --state open --search "updated:<$CUTOFF -author:jdx -label:keep-open sort:updated-asc" --json number,statusCheckRollup --limit 500 | \ | |
| gh pr list -R "$REPO" --state open --search "updated:<$CUTOFF -author:jdx -label:keep-open" --sort updated --order asc --json number,statusCheckRollup --limit 500 | \ |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 x -- echo |
22.4 ± 0.7 | 21.5 | 24.4 | 1.00 |
mise x -- echo |
22.5 ± 0.6 | 21.7 | 31.4 | 1.00 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 env |
21.8 ± 1.0 | 20.9 | 30.0 | 1.00 |
mise env |
22.2 ± 1.0 | 21.1 | 29.8 | 1.02 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 hook-env |
23.0 ± 0.9 | 21.7 | 31.7 | 1.00 |
mise hook-env |
24.1 ± 1.0 | 22.4 | 30.1 | 1.05 ± 0.06 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.22 ls |
22.5 ± 0.9 | 21.5 | 32.3 | 1.00 |
mise ls |
23.4 ± 0.6 | 22.2 | 25.0 | 1.04 ± 0.05 |
xtasks/test/perf
| Command | mise-2026.4.22 | mise | Variance |
|---|---|---|---|
| install (cached) | 165ms | 170ms | -2% |
| ls (cached) | 79ms | 83ms | -4% |
| bin-paths (cached) | 81ms | 83ms | -2% |
| task-ls (cached) | 798ms | 799ms | +0% |
### 🚀 Features - **(backend)** add global libc preference by @jdx in [#9404](#9404) - opt-in to pre-release versions for github and aqua backends by @jakedgy in [#9329](#9329) ### 🐛 Bug Fixes - **(backend)** allow unresolved latest opt-in by @jdx in [#9401](#9401) - **(install)** stop rewriting healthy runtime symlinks by @jdx in [#9410](#9410) - **(node)** route musl tarball URLs to unofficial-builds by @jdx in [#9409](#9409) - **(prune)** skip remote version resolution for tracked configs by @jdx in [#9406](#9406) - **(schema)** allow array values in tool additionalProperties by @JP-Ellis in [#9400](#9400) ### 📦️ Dependency Updates - bump communique to 1.1.2 by @jdx in [#9402](#9402) ### 📦 Registry - use aqua for rumdl by @scop in [#9397](#9397) ### Chore - **(ci)** improve pr-closer workflow by @jdx in [#9403](#9403) - **(release)** stop appending sponsor blurb when communique succeeds by @jdx in [#9395](#9395) ### New Contributors - @JP-Ellis made their first contribution in [#9400](#9400)
Summary
permissions: pull-requests: writeso the job can't 403 on read-only default tokens.jdx/misewith${{ github.repository }}(viaREPOenv).--search "updated:<CUTOFF -author:jdx -label:keep-open sort:updated-asc"and bumps--limitto 500. Only stale candidates are fetched, sorted oldest-first, so anything beyond the limit rolls into the next daily run instead of being silently skipped.Test plan
workflow_dispatchonce merged to confirm a clean run🤖 Generated with Claude Code
Note
Low Risk
Low risk: limited to a GitHub Actions workflow and only changes how stale PRs are queried/closed; main risk is mis-filtering PRs and closing the wrong ones.
Overview
Improves the
pr-closerGitHub Actions workflow by granting explicitpull-requests: writepermissions and removing the hardcoded repository in favor of${{ github.repository }}.Changes stale-PR selection to be filtered server-side using a date cutoff search (sorted oldest-first) and increases the fetch limit to 500 before closing candidates, while keeping the “failing vs passing checks” close message behavior.
Reviewed by Cursor Bugbot for commit ae0b5f8. Bugbot is set up for automated code reviews on this repo. Configure here.