Morning GitHub briefing
Phase 1: what is already known
- Read
memory/progress.md: the date of the last briefing and the items already reported, with their state. - Read the newest file in
memory/briefings/; an item reported before is repeated only when its state changed (a check went red, a review landed, a comment arrived).
Phase 2: collect
get_mefor the login, then through thegithubserver:- review requests:
search_pull_requestswithis:open review-requested:@me - the person's open pull requests:
search_pull_requestswithis:open author:@me, thenpull_request_readwithmethod: get_statuson each to find failing checks - issues:
search_issueswithis:open is:issue assignee:@me, andis:open is:issue mentions:@me updated:>=<yesterday>
- review requests:
- If the server is not signed in or the calls fail, fall back to the
ghCLI once:gh search prs --review-requested=@me --state=open,gh search prs --author=@me --state=open,gh pr checks <number> --repo <owner/repo>. Each command asks; say in the last line of the briefing that the fallback was used. - For each failing pull request,
get_job_logswithfailed_only(orgh run view --log-failed) and keep the one line that names the failing step. Do not paste logs.
Phase 3: write
- For an item that clearly needs a reply from the person (a question addressed to them, a review waiting more than two working days), draft one comment of at most three sentences under
## Drafts. Do not post it. - Write
memory/briefings/<YYYY-MM-DD>.mdin the format below, then rewritememory/progress.md.
Stop conditions
- No session with the server and no
GH_TOKENin the environment: a one-line briefing saying so, stop. - More than 50 items in a group: the 20 most recently updated and the count.
- The person asks you to post a draft: call
add_issue_commentwith that draft verbatim; the approval shows the text. Never post more than the person named.
Output format
# GitHub briefing <YYYY-MM-DD>
## Failing checks
- <owner/repo>#<n> <title> — <failing check> (<link>)
## Review requests
- <owner/repo>#<n> <title> — waiting <d> days (<link>)
## Issues
- <owner/repo>#<n> <title> — <why it is here> (<link>)
## Drafts
- for <owner/repo>#<n>: "<comment text>"
Since last time: <what changed>
At most 20 lines before ## Drafts. If the gh fallback was used, the last line says so.