resolve-greptile-comments
Resolve Replied Greptile Comments
Resolve all Greptile bot review comment threads on a GitHub PR that already have human replies. This avoids cluttering the PR conversation view with already-addressed bot feedback.
How it works
- Parse the PR URL or number from
$ARGUMENTSto extractowner,repo, andpr_number - Fetch all review threads via GitHub GraphQL API
- Identify threads started by
greptile-appsthat have reply comments (i.e., already addressed) - Resolve those threads, skipping any already resolved
- Report what was done
Step 1: Parse PR reference
Extract owner, repo, and PR number from $ARGUMENTS. Supports formats:
- Full URL:
https://github.com/OWNER/REPO/pull/NUMBER - Short:
OWNER/REPO#NUMBER - Number only:
NUMBER(requires--repoflag or defaults to current repo viagh repo view)
# Example parsing
PR_URL="$ARGUMENTS"
# Extract from URL pattern
if echo "$PR_URL" | grep -qE 'github\.com/'; then
OWNER=$(echo "$PR_URL" | sed -E 's|.*github\.com/([^/]+)/([^/]+)/pull/([0-9]+).*|\1|')
REPO=$(echo "$PR_URL" | sed -E 's|.*github\.com/([^/]+)/([^/]+)/pull/([0-9]+).*|\2|')
PR_NUMBER=$(echo "$PR_URL" | sed -E 's|.*github\.com/([^/]+)/([^/]+)/pull/([0-9]+).*|\3|')
elif echo "$PR_URL" | grep -qE '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+#[0-9]+$'; then
OWNER=$(echo "$PR_URL" | cut -d/ -f1)
REPO=$(echo "$PR_URL" | cut -d/ -f2 | cut -d# -f1)
PR_NUMBER=$(echo "$PR_URL" | cut -d# -f2)
else
PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+')
# Get owner/repo from current git remote
OWNER=$(gh repo view --json owner -q '.owner.login')
REPO=$(gh repo view --json name -q '.name')
fi
Step 2: Fetch review threads and identify Greptile threads with replies
Use the GraphQL API to get all review threads, filtering for ones started by greptile-apps that are not yet resolved.
gh api graphql -f query='
{
repository(owner: "'"$OWNER"'", name: "'"$REPO"'") {
pullRequest(number: '"$PR_NUMBER"') {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 2) {
totalCount
nodes {
author { login }
}
}
}
}
}
}
}'
Filter the results to find threads where:
- First comment author is
greptile-apps(the bot) totalCount > 1(has at least one reply)isResolvedisfalse
Step 3: Resolve the threads
For each matching thread ID, call the resolve mutation:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "THREAD_NODE_ID"}) {
thread { isResolved }
}
}'
Step 4: Report
Print a summary:
- How many Greptile threads were found total
- How many were already resolved
- How many were resolved now
- How many had no replies (left unresolved)
More from vimkim/my-cubrid-skills
jira
Look up CUBRID JIRA issue context. Use when a CBRD-XXXXX ticket is mentioned or when the user asks about a JIRA issue.
9create-testcases
Create CUBRID test cases (unit/SQL/shell) for a given feature or bug fix. Use when the user asks to create tests, write test cases, or mentions testing a CBRD ticket.
9cubrid-manual
Search the CUBRID manual (RST docs in en/ and ko/) for SQL syntax, configuration parameters, API references, admin utilities, and any CUBRID documentation. Use when you need to look up CUBRID behavior, verify SQL semantics, or answer questions about CUBRID features.
9cubrid-pr-review
CUBRID C/C++ PR code review with LSP/clangd analysis and C++ safety checks. Use when reviewing a CUBRID pull request, when the user shares a GitHub PR URL from a CUBRID repo, asks to review or check a pull request, or requests LSP-based analysis of PR changes. Even if the user just pastes a CUBRID PR link without explicit instructions, this skill applies.
9cubrid-pr-create
Create a GitHub PR for the CUBRID project with [CBRD-XXXXX] title format and Korean body with English section headers. Use when the user wants to create a pull request for CUBRID changes.
9cubrid-oos-context
Load CUBRID OOS (Out-of-row Overflow Storage) project context from the local knowledge base. Use this skill whenever OOS is mentioned, when working on the feat/oos branch, when touching oos_file.cpp or OOS-related heap_file.c code, when CBRD-26517/26458/26516 or other OOS JIRA tickets come up, or when you need to understand the OOS architecture, record format, CRUD flows, or MVCC integration. Also trigger when you see OOS-related identifiers like OR_MVCC_FLAG_HAS_OOS, OR_VAR_BIT_OOS, FILE_OOS, oos_insert, oos_read, oos_delete, or heap_record_replace_oos_oids.
9