From claude-commands
Reference for four distinct PR automation cron workflows: comment-only, comment-validation, fixpr, and fix-comment modes, each with separate scopes and schedules.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:pr-automation-workflowsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**CRITICAL**: There are FOUR distinct workflows, each running on separate cron schedules. They are NOT conditional branches - they are separate execution modes.
CRITICAL: There are FOUR distinct workflows, each running on separate cron schedules. They are NOT conditional branches - they are separate execution modes.
Cron: Every hour (0 * * * *)
Command: jleechanorg-pr-monitor --max-prs 10
What it does:
<!-- codex-automation-commit:SHA -->Scope: ALL open, non-draft PRs in the organization
Cron: Every 30 minutes (*/30 * * * *)
Command: jleechanorg-pr-monitor --comment-validation --max-prs 10
What it does:
@coderabbit-ai @greptileai @bugbot @copilot - asks bots to review<!-- comment-validation-request:SHA -->Scope: ALL open, non-draft PRs in the organization
Cron: Every 30 minutes (*/30 * * * *)
Command: jleechanorg-pr-monitor --fixpr --max-prs 10 --cli-agent gemini,cursor
What it does:
Scope: PRs with merge conflicts OR failing CI checks
Cron: Commented out
Command: jleechanorg-pr-monitor --fix-comment --cli-agent gemini,cursor --max-prs 3
What it does:
Scope: PRs with unaddressed review comments
Cron: Every hour at :15 (15 * * * *)
Command: jleechanorg-pr-monitor --codex-update
What: Runs Codex automation tasks (browser-based)
Cron: Every hour at :30 (30 * * * *)
Command: jleechanorg-pr-monitor --codex-api --codex-apply-and-push
What: Runs Codex automation via API (not browser)
| Workflow | Posts Comments? | Branch Filter? | Target PRs |
|---|---|---|---|
| Comment-only | Yes (Codex support) | NO - ALL PRs | All non-draft |
| Comment-validation | Yes (bot review) | NO - ALL PRs | All non-draft |
| Fixpr | No (fixes issues) | NO | PRs with conflicts/failing checks |
| Fix-comment | No (addresses comments) | NO | PRs with review comments |
❌ WRONG: "Comment-only mode should only post on Codex branches" ✅ RIGHT: "Comment-only mode posts on ALL non-draft PRs"
❌ WRONG: "Comment-validation is for non-Codex branches only" ✅ RIGHT: "Comment-validation is a separate cron job that runs on ALL non-draft PRs"
❌ WRONG: "Use branch name to decide which comment type to post" ✅ RIGHT: "The cron job determines the comment type (--comment-validation flag)"
The monitoring cycle code path (line 4003 in jleechanorg_pr_monitor.py):
if comment_validation:
# Post comment validation request (asks AI bots to review)
comment_result = self.post_comment_validation_request(repo_full_name, pr_number, pr)
else:
# Post codex instruction comment (asks Codex to code)
comment_result = self.post_codex_instruction_simple(repo_full_name, pr_number, pr)
The flag determines the comment type, NOT the branch name.
When automation (Codex) or the /copilot tool fixes PR comments, require URL tracking artifacts:
responses.json entries should include html_url for each processed comment.[codex-automation-commit] for automation system tasks.[copilot-commit] for /copilot tool executions.FIXEDCONSIDERED (ACKNOWLEDGED/DEFERRED/NOT_DONE)responses.json is missing URLs, backfill from comments.json by matching comment IDs in a type-safe way ((.id|tostring) == $id).This keeps both fix-comment/codex automation and manual /copilot workflows auditable and consistent with expectations.
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsAutomatically polls and shepherds open PRs/MRs: triages review comments, fixes CI failures, pushes autofix commits, and keeps pull requests moving without manual intervention. Supports GitHub and GitLab.
Monitors pull requests through to merge by automatically handling CI failures, review comments, and thread resolution until all checks pass. Invoke after PR creation or via /pr-shepherd.
Executes GitHub operations on PRs, issues, milestones, labels, comments, and merges using Python scripts with structured output and error handling. Use for pull requests, issues, review comments, CI checks, or milestones instead of raw gh.