From bcde76a8980cd2fbf92009a3c07975f8bcffbff0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 18:53:31 +0100 Subject: [PATCH] docs: add efficient gh triage guide --- AGENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 724310f5a78..7909c331bbd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -89,6 +89,9 @@ Scoped guides: ## GitHub API +- Issue/PR triage: list first, hydrate few. Use bounded fields + `--jq`, e.g. `gh issue list --state open --limit 80 --json number,title,labels,updatedAt,comments --jq '.[]|[.number,.updatedAt,.comments,.title]|@tsv'`; then `gh issue view --json title,body,comments,labels,createdAt,updatedAt,url --jq '{title,labels,createdAt,updatedAt,url,body,comments:[.comments[]|{author:.author.login,createdAt,body}]}'` only for shortlisted items. +- Search/dedupe: prefer `gh search issues 'repo:openclaw/openclaw is:open ' --json number,title,state,updatedAt --limit 20 --jq '.[]|[.number,.updatedAt,.title]|@tsv'`; avoid repeated full `--comments` scans. +- PR links: `gh pr list --state open --search '' --json number,title,updatedAt,headRefName --limit 20`; use `gh pr view --json number,title,body,closingIssuesReferences,files,statusCheckRollup,reviewDecision` only after shortlist. - CI polling: keep full `gh` capability, but request only needed fields. Known run status: `gh api repos///actions/runs/ --jq '{status,conclusion,head_sha,updated_at,name,path}'`. - Waiting: poll lightly, usually 30-60s backoff. Fetch jobs/logs/artifacts only after completion/failure or when job detail is needed; avoid repeated workflow + run + jobs loops.