5 Commits
Author SHA1 Message Date
priya-sundaram-dev 15c5af0255 fix(ci): correct the Hacktoberfest tracker's open-issue count and add a countdown (#15235)
* fix(ci): count open issues reliably and add a Hacktoberfest countdown

The tracker's "Open issues" line was showing the pull-request total (e.g.
621) instead of the issue total (107). GitHub's `/search/issues`
`is:issue` / `is:pr` qualifiers are unreliable on this large, high-churn
repo -- some runs return the PR pool for *both* queries, so the two lines
printed the same number.

Count without the flaky qualifiers instead:
- open PRs = the `Link: rel="last"` page number of `/repos/{repo}/pulls`
  (deterministic, page-numbered pagination);
- open issues = the repo endpoint's `open_issues_count` (issues + PRs)
  minus the open-PR total -- self-checking and stable.

Also add the requested Hacktoberfest countdown to the stats block:
- days until 2026-10-01;
- issues to close per day to clear the backlog;
- PRs to merge or close per day to clear the backlog.

Per-day figures round up (finishing a day early beats a day late) and
degrade to a clear message once Hacktoberfest starts, so the block never
divides by zero on the final day.

* chore: re-trigger keeper after marking PR checklist
2026-09-09 10:42:03 +02:00
priya-sundaram-dev 6372acb164 fix(ci): persist Hacktoberfest tracker via a PR (protected-branch push was silently failing) (#15231)
* fix(ci): open a PR to persist Hacktoberfest tracker instead of pushing to protected master

* ci: use bundled gh CLI instead of peter-evans/create-pull-request

Per @cclauss / zizmor 'superfluous actions' audit, persist the rolling
tracker PR with the gh CLI rather than a third-party action.

* fix(ci): make tracker refresh degrade gracefully when rate limited

The dry run was failing because a run can exhaust the GITHUB_TOKEN's
1000/hour-per-repo budget (shared across concurrent runs) — chiefly the
awaiting-reviews directory scan. A single exhausted request then raised
and killed the whole job.

- _request now honours Retry-After (secondary limits) and, once retries
  are exhausted, raises BestEffortError instead of a bare RuntimeError.
- Row resolution, the directory scan, and the search counts catch
  BestEffortError and degrade (keep the row / mark the stat unavailable)
  instead of failing. Only the post-Oct-1 retirement exits non-zero.
- Trim the directory scan to 120 PRs and CONCURRENCY to 5 to stay well
  under the shared budget in the first place.
2026-09-09 07:13:11 +02:00
priya-sundaram-dev 22899ed01e ci: dry-run the Hacktoberfest prep tracker on push/PR (#15227)
* ci: dry-run hacktoberfest prep on push/PR, add path filters

* ci: use double quotes in path filters (prettier)

* fix: resolve tracker rows via /issues so issue rows don't 404

The tracker's 'Open issues' section lists issue numbers; querying them
against /pulls/{n} returns 404 and crashed the whole refresh. Query the
unified /issues/{n} endpoint instead, which resolves for both PRs and
issues; a row is 'merged' only when it's a PR with merged_at set.
2026-09-08 12:53:28 +02:00
priya-sundaram-dev fb906d8504 perf: async fan-out + progress reporting for hacktoberfest prep tracker (#15226)
The daily prep job spent ~16 minutes because it looked up the changed
files of every open 'awaiting reviews' PR one request at a time. Those
lookups are independent, so fire them concurrently through a single
httpx2.AsyncClient bounded by a small semaphore, and likewise resolve the
tracked-row PR states and the issue/PR counts concurrently. Report
progress to stderr (flushed) so a human watching the Actions log can see
the job is alive. Runtime drops from ~16 min of serial round-trips to
well under a minute.
2026-09-08 09:50:36 +02:00
priya-sundaram-devandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 1eeed73945 ci: daily Hacktoberfest 2026 prep tracker refresh (cron 11:50 UTC) (#15225)
* ci: daily Hacktoberfest 2026 prep tracker refresh (cron 11:50 UTC)

Adds .github/workflows/hacktoberfest_prep.yml (schedule: 50 11 * * *) and
scripts/hacktoberfest_prep_update.py. Each run:

- ticks tracked PR rows in docs/hacktober_2026_prep.md that are now
  merged/closed (`[ ]` -> `[x]`),
- rewrites an 'Automated statistics' section with the current open issue and
  open PR counts plus the top three directories with the most open
  'awaiting reviews' PRs,
- exits non-zero once Hacktoberfest 2026 has begun (>= 2026-10-01), so the
  prep window closing is loud and the job gets retired.

Standard library only; uses the Actions GITHUB_TOKEN. Refs #15081.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* style: wrap implicit string concatenations (ISC004)

* refactor: use httpx2 for API calls, drop unneeded future import

Address review feedback on the Hacktoberfest prep cron:
- Switch the tracker script from urllib to httpx2, the repo's standard
  HTTP client, and add an install step to the workflow.
- Drop 'from __future__ import annotations' (unnecessary on Python >= 3.14t).

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-08 08:48:46 +02:00