Skill 34 · N8n:community PR Readiness Check
Subchapter 34.3
reference/re-review.mdMarkdown3 KBView on GitHub
When looping over the GHC queue, skip PRs you reviewed before unless the contributor has actually done something. This avoids burning agent runs on PRs that are still waiting on the contributor.
Any of:
committed event)head_ref_force_pushed)commented)reviewed)Label changes, description edits by us, and skill-posted comments don’t count.
The timeline endpoint returns every event on the PR with actor.login and a timestamp, so we can distinguish “contributor activity” from “skill activity” cleanly. This replaces an earlier heuristic that compared committedDate to the last skill comment — too narrow, since it missed contributor comments and force-pushes.
SKILL_USER=$(gh api user --jq .login)
gh api --paginate "repos/n8n-io/n8n/issues/<number>/timeline" \
-H "Accept: application/vnd.github+json"Resolve the skill user’s login ($SKILL_USER above). This is the GitHub handle the skill is running as.
Fetch the full timeline.
Find the last skill-authored event — any event where actor.login == $SKILL_USER (labels applied, comments posted, etc.). Take its timestamp as lastSkillAt. If no skill activity exists → first-time review, run the full check.
Scan for contributor activity after lastSkillAt — events where:
event is one of committed, head_ref_force_pushed, commented, reviewed,commented / reviewed / head_ref_force_pushed, actor.login != $SKILL_USER (skill comments shouldn’t trigger re-review of themselves),lastSkillAt.Timestamp field varies by event type:
| Event | Timestamp field |
|---|---|
committed | committer.date |
head_ref_force_pushed | created_at |
commented | created_at |
reviewed | submitted_at |
Decide:
For committed events, there’s no actor.login — the actor is the commit author email. Since the skill never pushes commits, treat every committed event as contributor activity unconditionally.
Body edits don’t generate timeline events, so a contributor who only updates the PR description (e.g. fills in a missing template section) won’t be picked up. That’s a GitHub API limitation; the skill can’t see body edits without diffing against a cached snapshot.
If the user explicitly mentions a PR they edited, just re-review it — that’s faster than working around the API.