Check weekly checks forgejo actions #18

Closed
opened 2026-08-15 07:54:49 +00:00 by marvin8 · 3 comments
Owner

Yilan should with each run look at the status of the last weekly check forgejo action run and show a tick against the project if the weekly check finished successfully or a cross if the the weekly run ended with a non zero return code.

Additionally it might be nice to re-order the table in the top of BOARD.md so that projects where the last weekly checks run was unsuccessful are at the top.

Yilan should with each run look at the status of the last weekly check forgejo action run and show a tick against the project if the weekly check finished successfully or a cross if the the weekly run ended with a non zero return code. Additionally it might be nice to re-order the table in the top of BOARD.md so that projects where the last weekly checks run was unsuccessful are at the top.
Collaborator

Documenting the design discussion for this issue.

What the feature needs

Per-repo ✓/✗ for the weekly-checks.yml Forgejo Actions workflow, with failures sorted to the top of the summary table.

Findings (verified against the live API)

  1. Use /actions/tasks, not /actions/runs. Two endpoints, different shapes:

    • /actions/runs — sparse: conclusion null, created_at null, event misreported as push.
    • /actions/tasks — GitHub-compatible: has created_at, run_number, head_sha, correct event: "schedule".
      Timestamps exist and event == "schedule" works; use /actions/tasks.
  2. Terminal state is status, not conclusion. Values: success / failure / cancelled. "Non-zero return code" → status == "failure". Decide: is cancelled a ✗ or a separate ⚠? What does a still-running run (in_progress/queued) show at scrape time?

  3. Per-job granularity. name is the job name; one entry per job per run (multi-job workflows split, sharing run_number). Scope by workflow_id (the filename). weekly-checks.yml is single-job today; a trap if it ever grows a second job.

  4. No server-side filtering. ?event=schedule was ignored (still returned push/release/PR rows). Filter client-side on event == "schedule" + workflow_id == "weekly-checks.yml", newest-first. Busy repos may need pagination to reach the last schedule run.

  5. Third state: "never run yet". Post-migration, most repos have the workflow but zero runs yet. Needs distinct rendering and a sort decision ("not yet run" is not a failure). Distinguish it from "no workflow at all" — an empty runs list is ambiguous; either rely on "every repo has weekly-checks.yml" (empty == never ran) or probe the raw workflow file (200/404).

  6. Staleness is a feature decision now. created_at exists, so yilan can render "last ran YYYY-MM-DD" and flag green-but-older-than-N-days. Decide the decay policy.

  7. SHA cache must be bypassed. Weekly-check status changes without a commit (scheduled run on same HEAD, manual re-run, first run). The commit-SHA cache would freeze it; fetch actions separately (always, or its own TTL).

  8. Discovery prerequisite: exclude private repos. The checks column inherits yilan's repo list, and _fetch_owner_repos currently filters only fork + archived — no private filter. BOARD.md is public, so a private repo (e.g. arvak) would leak issues/TODO/commits. Token choice interacts: anonymous scrape auto-drops private repos but is rate-limited; a broad PAT sees them and must filter private == true explicitly.

  9. Sort interaction. Current sort is active-first, then name. "Failed weekly check" becomes the top key — decide precedence (failed vs active), the tiebreak for multiple failures, and whether reordering the table also reorders the ### prose sections (they share the same repos list).

  10. Plumbing. New RepoData field, a summary-table column, a - **Weekly check**: prose line, and RepoDiff/snapshot tracking so yilan diff reports ✓→✗ transitions.

Documenting the design discussion for this issue. ## What the feature needs Per-repo ✓/✗ for the `weekly-checks.yml` Forgejo Actions workflow, with failures sorted to the top of the summary table. ## Findings (verified against the live API) 1. **Use `/actions/tasks`, not `/actions/runs`.** Two endpoints, different shapes: - `/actions/runs` — sparse: `conclusion` null, `created_at` null, `event` misreported as `push`. - `/actions/tasks` — GitHub-compatible: has `created_at`, `run_number`, `head_sha`, correct `event: "schedule"`. Timestamps exist and `event == "schedule"` works; use `/actions/tasks`. 2. **Terminal state is `status`, not `conclusion`.** Values: `success` / `failure` / `cancelled`. "Non-zero return code" → `status == "failure"`. Decide: is `cancelled` a ✗ or a separate ⚠? What does a still-running run (`in_progress`/`queued`) show at scrape time? 3. **Per-job granularity.** `name` is the job name; one entry per job per run (multi-job workflows split, sharing `run_number`). Scope by `workflow_id` (the filename). `weekly-checks.yml` is single-job today; a trap if it ever grows a second job. 4. **No server-side filtering.** `?event=schedule` was ignored (still returned push/release/PR rows). Filter client-side on `event == "schedule"` + `workflow_id == "weekly-checks.yml"`, newest-first. Busy repos may need pagination to reach the last schedule run. 5. **Third state: "never run yet".** Post-migration, most repos have the workflow but zero runs yet. Needs distinct rendering and a sort decision ("not yet run" is not a failure). Distinguish it from "no workflow at all" — an empty runs list is ambiguous; either rely on "every repo has weekly-checks.yml" (empty == never ran) or probe the raw workflow file (200/404). 6. **Staleness is a feature decision now.** `created_at` exists, so yilan can render "last ran YYYY-MM-DD" and flag green-but-older-than-N-days. Decide the decay policy. 7. **SHA cache must be bypassed.** Weekly-check status changes without a commit (scheduled run on same HEAD, manual re-run, first run). The commit-SHA cache would freeze it; fetch actions separately (always, or its own TTL). 8. **Discovery prerequisite: exclude private repos.** The checks column inherits yilan's repo list, and `_fetch_owner_repos` currently filters only `fork` + `archived` — no `private` filter. `BOARD.md` is public, so a private repo (e.g. arvak) would leak issues/TODO/commits. Token choice interacts: anonymous scrape auto-drops private repos but is rate-limited; a broad PAT sees them and must filter `private == true` explicitly. 9. **Sort interaction.** Current sort is active-first, then name. "Failed weekly check" becomes the top key — decide precedence (failed vs active), the tiebreak for multiple failures, and whether reordering the table also reorders the `###` prose sections (they share the same `repos` list). 10. **Plumbing.** New `RepoData` field, a summary-table column, a `- **Weekly check**:` prose line, and `RepoDiff`/snapshot tracking so `yilan diff` reports ✓→✗ transitions.
Collaborator

Finalized plan (board-automation design):

  • State model: ✓ (success) / ✗ (failure) / — (everything else). Date appended only when >7 days old.
  • New RepoData.weekly_check_status/date; fetch /actions/tasks filtered to event=schedule + workflow_id=weekly-checks.yml; bypass the SHA cache.
  • Sort (failed, active, name); RepoDiff reports ✓→✗ transitions; private-repo filter added to discovery.
  • Branch: feat/issue-18-weekly-check-column
Finalized plan (board-automation design): - State model: ✓ (success) / ✗ (failure) / — (everything else). Date appended only when >7 days old. - New RepoData.weekly_check_status/date; fetch /actions/tasks filtered to event=schedule + workflow_id=weekly-checks.yml; bypass the SHA cache. - Sort (failed, active, name); RepoDiff reports ✓→✗ transitions; private-repo filter added to discovery. - Branch: feat/issue-18-weekly-check-column
Collaborator

Closed via commit 84a7cbf: yilan now fetches weekly-check status from the Forgejo Actions API, displays a ✓/✗/— column in BOARD.md, and sorts repos with failed weekly checks to the top.

Closed via commit 84a7cbf: yilan now fetches weekly-check status from the Forgejo Actions API, displays a ✓/✗/— column in BOARD.md, and sorts repos with failed weekly checks to the top.
Sign in to join this conversation.
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/yilan#18
No description provided.