Skip to content

fix(pr-pass): handle UNKNOWN mergeStateStatus from already-merged PRs - #562

Merged
baleen37 merged 1 commit into
mainfrom
fix/pr-pass-unknown-merge-state-clean
Mar 19, 2026
Merged

fix(pr-pass): handle UNKNOWN mergeStateStatus from already-merged PRs#562
baleen37 merged 1 commit into
mainfrom
fix/pr-pass-unknown-merge-state-clean

Conversation

@baleen37

@baleen37 baleen37 commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Summary

verify-pr-status.shmergeStateStatus=UNKNOWN일 때 PR이 이미 머지됐는지 확인하지 않고 exit 1로 빠지는 문제를 수정합니다.

Changes

  • plugins/me/skills/create-pr/scripts/verify-pr-status.sh: state 필드 추가 조회 — MERGED면 exit 0, CLOSED면 exit 1, OPEN+UNKNOWN이면 exit 2(CI pending)로 처리. UNKNOWN mergeStateStatus를 BLOCKED|UNSTABLE과 같이 분류.
  • plugins/me/skills/pr-pass/SKILL.md: 진단 명령에 state 필드 추가, UNKNOWN 상태 해석 가이드 명시.

Tests

모든 state 조합(MERGED/CLOSED/OPEN+UNKNOWN/OPEN+BLOCKED)에 대해 exit code와 출력 메시지 검증 완료.

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced PR status verification to properly detect and handle all possible merge states, including edge cases with unknown states.
  • Documentation

    • Updated diagnosis guidance to help users identify and resolve issues related to unknown merge states with clearer state interpretation (MERGED, CLOSED, OPEN).

@baleen37
baleen37 enabled auto-merge (squash) March 19, 2026 00:05
@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49a67d46-cc86-4039-a444-9c1ccf56e08e

📥 Commits

Reviewing files that changed from the base of the PR and between c8668d0 and 7cbd972.

📒 Files selected for processing (2)
  • plugins/me/skills/create-pr/scripts/verify-pr-status.sh
  • plugins/me/skills/pr-pass/SKILL.md

📝 Walkthrough

Walkthrough

The changes enhance PR verification by reading the PR state from GitHub API and adding early exits for merged or closed states. UNKNOWN is treated as a distinct state, and documentation is updated to guide handling of these edge cases.

Changes

Cohort / File(s) Summary
PR Verification Script
plugins/me/skills/create-pr/scripts/verify-pr-status.sh
Added PR state field reading from GitHub API with early exit logic for MERGED and CLOSED states. Extended state evaluation to treat UNKNOWN as a distinct merge state. Updated default case reporting.
PR Verification Guidance
plugins/me/skills/pr-pass/SKILL.md
Updated diagnostic command to include state field and added guidance block for interpreting mergeStateStatus: UNKNOWN with possible state combinations (MERGED, CLOSED, OPEN).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A state is born, no longer unknown,
MERGED and CLOSED now catch and shown,
Early exits swift and clean,
The finest PR verification seen! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-pass-unknown-merge-state-clean
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 merged commit 3886518 into main Mar 19, 2026
4 of 5 checks passed
@baleen37
baleen37 deleted the fix/pr-pass-unknown-merge-state-clean branch March 19, 2026 00:06
baleen-release-app Bot pushed a commit that referenced this pull request Mar 19, 2026
## [6.0.1](v6.0.0...v6.0.1) (2026-03-19)

### Bug Fixes

* **pr-pass:** handle UNKNOWN mergeStateStatus from already-merged PRs ([#562](#562)) ([3886518](3886518))
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.

1 participant