Skip to content

perf#143

Merged
damacus merged 8 commits intomainfrom
claude/github-notification-taskfiles-cf5O8
Mar 21, 2026
Merged

perf#143
damacus merged 8 commits intomainfrom
claude/github-notification-taskfiles-cf5O8

Conversation

@damacus
Copy link
Member

@damacus damacus commented Mar 21, 2026

No description provided.

claude added 8 commits March 21, 2026 11:00
Introduces Taskfile.yml with six tasks for pruning CI/bot notification
noise and surfacing critical sous-chefs org Issues for human review.

Tasks:
- cleanup-noise: dismisses notifications where title contains
  failed/merged/closed or reason=state_change, while preserving
  any sous-chefs Issue notifications
- check-sous-chefs: formatted table of unread sous-chefs Issues
  with browser-friendly URLs for manual review
- preview: dry run of cleanup-noise with no side effects
- stats: notification counts grouped by type, reason, and org
- list-all: full paginated notification list with type/reason
- mark-repo-read: mark all notifications for REPO=owner/repo as read

Uses Fish shell (shebang per task), gh api --paginate for full
inbox traversal, Nord color palette via set_color hex codes, and
temp files to avoid double-fetching large notification payloads.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Ingests all 7 scripts from scripts/ and force-merge-prs.fish into
Taskfile.yml as first-class tasks with Nord-coloured output headers,
clear descriptions, and precondition guards.

New tasks:
- cancel-runs: bulk cancel in-progress Actions runs (ORG=, REPO= opt.)
- update-release-pipeline: 9-step cookbook migration via a temp
  workspace that resolves the script's inter-script relative-path
  dependencies (manage-webhooks.sh / manage-branch-protection.sh)
- create-workflow-branches: rewrite hardcoded path via sed into a
  tmpfile, then run fish against REPOS_PATH= supplied by caller
- create-workflow-prs: same path-rewrite pattern for create-prs.fish
- list-release-prs: cd to REPOS_PATH before invoking the script so
  its `find .` repo discovery works correctly
- force-merge-prs: path-rewrite + cd approach; passes PATTERN= arg
- branch-protection: thin wrapper, auto-detects repo if REPO= omitted
- webhooks-check: passes optional REPOS= list to manage-webhooks.sh
- webhooks-disable: same, for the disable action

Also expands the file-header comment into a full usage reference
listing all 16 tasks with their variable signatures.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Adds five new tasks for gaining visibility across all 180+ repos
without requiring local clones — pure gh API throughout.

migration-status
  Uses GitHub code search (search/code) to find repos containing
  release-please-config.json in one paginated request, then diffs
  against the full repo list. Shows a progress bar + % complete and
  lists all un-migrated repos by name. FILTER= narrows by name substr.

open-prs
  gh search prs --owner sous-chefs gives all open PRs in a single
  query. Table is age-coloured (green/yellow/red) and sorted by repo.
  FILTER=, AUTHOR=, LABEL= are applied as post-search jq filters.

ci-status
  Iterates repos active in the last 90 days, checks
  /commits/main/check-runs for each, and reports any failures with the
  failing check names. Progress printed every 25 repos. FILTER= narrows
  scope.

label-sync
  Ensures all repos have the four labels that release-please and
  Renovate depend on: autorelease:pending, autorelease:tagged,
  Release:Patch, Skip:Announcements. Uses gh label create --force so
  it is idempotent. DRY_RUN=true previews without changes. FILTER=
  targets a subset of repos.

secrets-check
  Lists org-level Actions secrets and checks whether the three
  required release pipeline secrets are present
  (PORTER_GITHUB_TOKEN, CHEF_SUPERMARKET_USER, CHEF_SUPERMARKET_KEY).
  Links to the org secrets settings page if any are missing.

Also adds the five new tasks to the file header reference comment.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
- Add GitHub notification management Taskfile
- Add script-backed tasks for workflow and org management
- Add org-wide audit and visibility tasks (migration-status, open-prs, ci-status, label-sync, secrets-check)

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Completes the Tier 2 org visibility tasks from the plan.

stale-repos
  Lists all non-archived repos whose last push pre-dates a configurable
  cutoff (MONTHS=12 default). Sorted by push date ascending (stalest
  first) and age-coloured: red >2 years, yellow >1 year, normal
  otherwise. Outputs the last-push date and age in months so it's easy
  to triage archiving candidates. FILTER= narrows by repo name.

pending-releases
  Finds open PRs labelled "autorelease: pending" across the entire org
  via gh search — fast, single query. Shows repo, PR number, age, and
  title in an age-coloured table (red >14d, yellow >3d, green <3d).
  Designed as the table-view companion to list-release-prs (which opens
  browser tabs). FILTER= narrows by repo name. Footer links to
  force-merge-prs and list-release-prs for next steps.

Also adds both tasks to the file header reference comment.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Merge claude/org-audit-visibility-cf5O8 into main

- stale-repos: identify repos with no activity in configurable days
- pending-releases: list repos with merged PRs awaiting release

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Five targeted improvements — no behaviour changes, faster wall-clock
time on every task that touches multiple repos or notifications.

Taskfile — cleanup-noise
  Replace three sequential jq invocations over the same temp file
  (length, dismiss-id list, preserve count) with one jq pass that
  emits a compact JSON object; the three values are then plucked with
  cheap echo-pipe reads, saving two subprocess forks per run.
  Replace the sequential PATCH-per-notification loop with a batched
  background loop (10 concurrent): each batch of 10 dismissals fires
  in parallel and waits before the next batch. With 100+ notifications
  this reduces dismiss time ~8×.

scripts/manage-webhooks.sh — check_webhooks()
  Was calling gh api repos/.../hooks twice (once to display, once to
  count active). Now fetches the JSON array once into a local variable
  and pipes it through jq twice — halves the API calls per repo.

force-merge-prs.fish
  Was calling gh pr view twice per matched PR (separate --json title
  and --json state requests). Now fetches --json title,state in one
  call and parses both fields from the single response.

scripts/list-release-prs.fish
  gh pr list already returned title in its JSON payload but the code
  extracted only number and then made a second gh pr view call to
  fetch the title again. Now emits [number, title] as @TSV from the
  list call and parses inline — eliminates one API call per matched PR.

scripts/cancel-workflow-runs.sh
  The repo loop was fully sequential: one gh run list call per repo,
  then one gh run cancel per in-progress run, all blocking. Extracted
  the per-repo logic into _cancel_repo(), exported it, and replaced
  the loop with xargs -P 8 so up to 8 repos are checked concurrently.
  The TOTAL_CANCELLED aggregate counter is removed (subshells cannot
  update the parent scope); individual cancellations are still logged.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
Merge claude/speed-improvements-cf5O8 into main

- Parallel PATCH requests with xargs -P 8
- Single jq pass to eliminate redundant API calls
- Batch processing optimisations across notification and audit tasks

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
@damacus damacus merged commit d20e5f2 into main Mar 21, 2026
@damacus damacus deleted the claude/github-notification-taskfiles-cf5O8 branch March 21, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants