Loading...
Loading...
Compare original and translation side by side
git fetchghgit fetchghghcommand -v gh &> /dev/null || { echo "GitHub CLI (gh) not installed. Install: https://cli.github.com/"; exit 1; }
gh auth status &> /dev/null || { echo "GitHub CLI not authenticated. Run: gh auth login"; exit 1; }ghcommand -v gh &> /dev/null || { echo "GitHub CLI (gh) not installed. Install: https://cli.github.com/"; exit 1; }
gh auth status &> /dev/null || { echo "GitHub CLI not authenticated. Run: gh auth login"; exit 1; }CURRENT_BRANCH=$(git branch --show-current)
MAIN_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "master")CURRENT_BRANCH=$(git branch --show-current)
MAIN_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "master")undefinedundefinedundefinedundefinedPR_JSON=$(gh pr view --json number,title,state,url,reviewDecision,statusCheckRollup,mergeable,reviews 2>/dev/null)
if [[ -z "$PR_JSON" ]]; then
echo "No PR exists for this branch"
else
PR_NUMBER=$(echo "$PR_JSON" | jq -r '.number')
PR_TITLE=$(echo "$PR_JSON" | jq -r '.title')
PR_STATE=$(echo "$PR_JSON" | jq -r '.state')
PR_URL=$(echo "$PR_JSON" | jq -r '.url')
fiPR_JSON=$(gh pr view --json number,title,state,url,reviewDecision,statusCheckRollup,mergeable,reviews 2>/dev/null)
if [[ -z "$PR_JSON" ]]; then
echo "No PR exists for this branch"
else
PR_NUMBER=$(echo "$PR_JSON" | jq -r '.number')
PR_TITLE=$(echo "$PR_JSON" | jq -r '.title')
PR_STATE=$(echo "$PR_JSON" | jq -r '.state')
PR_URL=$(echo "$PR_JSON" | jq -r '.url')
figh pr checks --json name,state,conclusion 2>/dev/null | jq -r '.[] | "\(.conclusion // .state) \(.name)"'gh pr checks --json name,state,conclusion 2>/dev/null | jq -r '.[] | "\(.conclusion // .state) \(.name)"'CLAUDE_COMMENTS=$(gh pr view --json comments --jq '[.comments[] | select(
(.author.login == "claude") or
((.author.login == "github-actions[bot]") and (.body | test("PR Review:|Claude|claude-code-action"; "i")))
)] | length')
if [[ "$CLAUDE_COMMENTS" -gt 0 ]]; then
echo "Claude review completed ($CLAUDE_COMMENTS comments)"
else
CLAUDE_WORKFLOW=$(gh run list --workflow=claude.yml --limit 1 --json conclusion,status --jq '.[0]' 2>/dev/null)
if [[ -n "$CLAUDE_WORKFLOW" ]]; then
STATUS=$(echo "$CLAUDE_WORKFLOW" | jq -r '.status // .conclusion')
echo "Claude review status: $STATUS"
else
echo "No Claude review configured"
fi
fiCLAUDE_COMMENTS=$(gh pr view --json comments --jq '[.comments[] | select(
(.author.login == "claude") or
((.author.login == "github-actions[bot]") and (.body | test("PR Review:|Claude|claude-code-action"; "i")))
)] | length')
if [[ "$CLAUDE_COMMENTS" -gt 0 ]]; then
echo "Claude review completed ($CLAUDE_COMMENTS comments)"
else
CLAUDE_WORKFLOW=$(gh run list --workflow=claude.yml --limit 1 --json conclusion,status --jq '.[0]' 2>/dev/null)
if [[ -n "$CLAUDE_WORKFLOW" ]]; then
STATUS=$(echo "$CLAUDE_WORKFLOW" | jq -r '.status // .conclusion')
echo "Claude review status: $STATUS"
else
echo "No Claude review configured"
fi
figh pr view --json reviews --jq '.reviews[] | "\(.author.login): \(.state)"'
gh pr view --json reviewDecision --jq '.reviewDecision'gh pr view --json reviews --jq '.reviews[] | "\(.author.login): \(.state)"'
gh pr view --json reviewDecision --jq '.reviewDecision'gh pr view --json mergeable --jq '.mergeable'gh pr view --json mergeable --jq '.mergeable'PR STATUS
=========
Branch: [current] -> [base] ([N commits behind])
Local State:
[clean/modified] working tree
[ahead/behind] remote
PR #[N]: "[title]"
State: [Open/Closed/Merged]
URL: [url]
CI Status:
[pass/fail] [check-name] (per check)
Claude Review:
[status]
Reviews:
[reviewer]: [state] (per reviewer)
Merge Status:
[mergeable/conflicts/approvals needed]PR STATUS
=========
Branch: [current] -> [base] ([N commits behind])
Local State:
[clean/modified] working tree
[ahead/behind] remote
PR #[N]: "[title]"
State: [Open/Closed/Merged]
URL: [url]
CI Status:
[pass/fail] [check-name] (per check)
Claude Review:
[status]
Reviews:
[reviewer]: [state] (per reviewer)
Merge Status:
[mergeable/conflicts/approvals needed]feature/authfeature/authfix/typofix/typogh auth logingh auth logingit push -u origin [branch]git push -u origin [branch]gh auth statusgh auth statusgit fetch origin --quietgit fetch origin --quietgh pr checksgh pr checks