Taylor/nathan command#286
Conversation
🤖 kluster.ai PR Review Summary⚡ Review this PR in 1/10 of the time — Try our new AI-powered code review experience 📋 PR SummaryThis PR updates the Nathan AI review workflow to support triggering via PR comments in addition to commit messages. The changes include a new GitHub Actions workflow ( 🔍 Issues DetectedFound 2 issue(s) in this PR
Powered by kluster.ai - Real-Time AI code review in your IDE |
There was a problem hiding this comment.
Pull request overview
Adds a new “Nathan Gate” GitHub Actions workflow that dispatches the existing trigger-n8n-workflow.yml based on +Nathan triggers (commit message or PR comment), and introduces a corresponding Claude skill for triggering the workflow via PR comment.
Changes:
- Added
.github/workflows/nathan-gate.ymlto gate/dispatch the Nathan workflow on PR sync or+Nathanissue comments. - Updated
.github/workflows/trigger-n8n-workflow.ymlto accept atrigger_sourceinput and treat comment-triggered dispatches as “triggered”. - Removed the older commit-only gate workflow and added a new Claude skill for invoking
+Nathanon the relevant PR.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/trigger-n8n-workflow.yml | Adds trigger_source input and adjusts trigger logic for comment-based dispatches. |
| .github/workflows/nathan-gate.yml | New gate/dispatcher workflow handling PR synchronize and issue comment triggers. |
| .github/workflows/nathan-commit-gate.yml | Removes the prior commit-only gating workflow. |
| .claude/skills/nathan /SKILL.md | Adds a Claude skill definition/instructions to trigger Nathan via PR comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 kluster.ai PR Review Summary⚡ Review this PR in 1/10 of the time — Try our new AI-powered code review experience 📋 PR SummaryThis PR updates the Nathan AI review workflow to support triggering via a "+Nathan" comment on a PR, in addition to the existing commit message trigger. The changes include adding a new GitHub Actions workflow ( 🔍 Issues DetectedFound 2 issue(s) in this PR
Powered by kluster.ai - Real-Time AI code review in your IDE |
| --jq "[.[] | select(.body | ascii_downcase | contains(\"+nathan\")) | select(.id | tostring != \"${CURRENT_COMMENT_ID:-}\")] | length" \ | ||
| 2>/dev/null || echo "0")" | ||
|
|
||
| if [[ "${recent}" -gt 0 ]]; then |
There was a problem hiding this comment.
🤖 kluster.ai · 🟠 semantic · high
Description: The Cooldown check promises to skip triggers to "prevent duplicate reviews", but it improperly blocks new commit pushes if an issue comment was recently posted.
Explanation: The cooldown logic queries issues/${PR_NUMBER}/comments to detect recent triggers. This creates a dual failure: rapid commit pushes bypass the cooldown entirely since they do not create comments, while a new commit pushed shortly after a comment is incorrectly blocked by the comment's presence. Since the push represents new code, blocking it suppresses a legitimate review rather than preventing a duplicate.
Recommended Action: This cooldown check should only evaluate and block issue_comment events to avoid silencing new commits. If rapid push triggers also require rate limiting, update the query to evaluate recent workflow runs or commits instead of just issue comments.
Issue Actions:
| run: | | ||
| set -euo pipefail | ||
|
|
||
| commits_json="$(gh api --paginate "repos/${REPO}/pulls/${PR_NUMBER}/commits" | jq -s 'add')" |
There was a problem hiding this comment.
🤖 kluster.ai · 🟡 performance · medium
Description: This gh api call paginates through all PR commits to read a single message, which increases API usage and execution time for large PRs.
Explanation: Using gh api --paginate forces the workflow to perform repeated external I/O by downloading every page of commits, only to extract the final commit via .[-1]. This complexity amplification slows down the gate execution linearly as the PR grows and consumes unnecessary API quota.
Recommended Action: This step should fetch the PR head SHA directly from the PR metadata and then fetch only that single commit instead of paginating the entire commit history.
Issue Actions:
Description
Adds Nathan command/skill to send a PR message using GH auth on the PR. Also provides cli, information for which branch is active in a PR/
Checklist
kluster-mkdocsrepo