Skip to content

fix(iterate-pr): Fix regex pattern error and clarify script paths#37

Merged
dcramer merged 1 commit intomainfrom
fix/iterate-pr-regex-and-paths
Feb 4, 2026
Merged

fix(iterate-pr): Fix regex pattern error and clarify script paths#37
dcramer merged 1 commit intomainfrom
fix/iterate-pr-regex-and-paths

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 4, 2026

Fix two issues with the iterate-pr skill discovered during usage:

  1. Regex pattern error: When fetch_pr_checks.py processes CI logs, it combines
    multiple regex patterns with | to search for failure markers. Each pattern had
    an inline (?i) flag for case-insensitivity, but Python's regex engine requires
    global flags to be at the start of the entire expression—not embedded in the middle
    after a |. This caused a re.PatternError on Python 3.14. Fixed by using
    re.IGNORECASE as a flag argument instead.

  2. Script path confusion: The skill's bundled scripts use gh CLI commands that
    require being run from a git repository. When Claude ran the scripts by cding
    into the plugin cache directory, gh pr view failed with "not a git repository".
    Added documentation clarifying scripts must run from the repo root, and updated
    all path references to use ${CLAUDE_SKILL_ROOT} to make this explicit.

- Fix re.PatternError when combining patterns with inline (?i) flags by
  using re.IGNORECASE flag in re.search() instead
- Add note that scripts must run from repository root directory
- Update all script references to use ${CLAUDE_SKILL_ROOT} for full paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dcramer dcramer merged commit 2168cd8 into main Feb 4, 2026
6 checks passed
@dcramer dcramer deleted the fix/iterate-pr-regex-and-paths branch February 4, 2026 20:15
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