Skip to content

Taylor/nathan command#286

Open
Telucero wants to merge 4 commits into
mainfrom
taylor/nathan-command
Open

Taylor/nathan command#286
Telucero wants to merge 4 commits into
mainfrom
taylor/nathan-command

Conversation

@Telucero
Copy link
Copy Markdown
Contributor

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

  • Required - I have added a label to this PR 🏷️
  • Required - I have run my changes through Grammarly
  • If pages have been moved, I have created redirects in the kluster-mkdocs repo

Copilot AI review requested due to automatic review settings April 29, 2026 15:46
@kluster-ai
Copy link
Copy Markdown

kluster-ai Bot commented Apr 29, 2026

🤖 kluster.ai PR Review Summary

Review this PR in 1/10 of the time — Try our new AI-powered code review experience

📋 PR Summary

This 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 (nathan-gate.yml) that listens for both pull_request and issue_comment events, and a modified trigger-n8n-workflow.yml that accepts an additional trigger_source input. The nathan skill documentation has also been updated to reflect the new comment-based triggering mechanism. The changes enable contributors to trigger Nathan reviews by posting +Nathan in a PR comment, while maintaining security controls to prevent unauthorized triggers.

🔍 Issues Detected

Found 2 issue(s) in this PR

⚠️ Warning: We haven't found any reviews performed on this branch from the IDE. Make sure to install the IDE and CLI integrations to catch issues earlier and accelerate your development workflow.

Powered by kluster.ai - Real-Time AI code review in your IDE

Comment thread .github/workflows/nathan-gate.yml Outdated
Comment thread .github/workflows/trigger-n8n-workflow.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to gate/dispatch the Nathan workflow on PR sync or +Nathan issue comments.
  • Updated .github/workflows/trigger-n8n-workflow.yml to accept a trigger_source input and treat comment-triggered dispatches as “triggered”.
  • Removed the older commit-only gate workflow and added a new Claude skill for invoking +Nathan on 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.

Comment thread .github/workflows/trigger-n8n-workflow.yml
Comment thread .github/workflows/nathan-gate.yml Outdated
Comment thread .claude/skills/nathan /SKILL.md
@kluster-ai
Copy link
Copy Markdown

kluster-ai Bot commented Apr 30, 2026

🤖 kluster.ai PR Review Summary

Review this PR in 1/10 of the time — Try our new AI-powered code review experience

📋 PR Summary

This 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 (nathan-gate.yml) that listens for both pull_request and issue_comment events, and dispatches the Nathan workflow when the trigger is detected. The workflow includes permission checks, cooldown checks to prevent duplicate reviews, and support for both direct contributors and fork contributors. The changes also update the trigger-n8n-workflow.yml to accept a trigger_source input, indicating whether the trigger came from a comment or commit.

🔍 Issues Detected

Found 2 issue(s) in this PR

⚠️ Warning: We haven't found any reviews performed on this branch from the IDE. Make sure to install the IDE and CLI integrations to catch issues earlier and accelerate your development workflow.

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
Copy link
Copy Markdown

@kluster-ai kluster-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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:

kluster.ai

run: |
set -euo pipefail

commits_json="$(gh api --paginate "repos/${REPO}/pulls/${PR_NUMBER}/commits" | jq -s 'add')"
Copy link
Copy Markdown

@kluster-ai kluster-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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:

kluster.ai

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