prcheckloop

Featured

Iterate on a GitHub PR until latest-head checks are green or a precise blocker is named. Use when a PR still has failing or pending checks after review fixes, including after greploop.

AI & Automation 114,742 stars 19046 forks Updated today MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PRCheckloop Get a GitHub PR to a fully green check state, or exit with a concrete blocker. ## Scope - GitHub PRs only. If the repo is GitLab, stop and use `check-pr`. - Focus on checks for the latest PR head SHA, not old commits. - Focus on CI/status checks, not review comments or PR template cleanup. - If the user also wants review-comment cleanup, pair this with `check-pr`. ## Inputs - **PR number** (optional): If not provided, detect the PR for the current branch. - **Max iterations**: default `5`. ## Workflow ### 1. Identify the PR If no PR number is provided, detect it from the current branch: ```bash gh pr view --json number,headRefName,headRefOid,url,isDraft ``` If needed, switch to the PR branch before making changes. Stop early if: - `gh` is not authenticated - there is no PR for the branch - the repo is not hosted on GitHub ### 2. Track the latest head SHA Always work against the current PR head SHA: ```bash PR_JSON=$(gh pr view "$PR_NUMBER" --json number,headRefName,headRefOid,url) HEAD_SHA=$(echo "$PR_JSON" | jq -r .headRefOid) PR_URL=$(echo "$PR_JSON" | jq -r .url) ``` Ignore failing checks from older SHAs. After every push, refresh `HEAD_SHA` and restart the inspection loop. ### 3. Inventory checks for that SHA Fetch both GitHub check runs and legacy commit status contexts: ```bash gh api "repos/{owner}/{repo}/commits/$HEAD_SHA/check-runs?per_page=100" gh api "repos/{owner}/{repo}/commits/$HEAD_SHA/status" ``` For a compact PR-level view, t...

Details

Author
paperclipai
Repository
paperclipai/paperclip
Created
8 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category