Skip to content

feat(skills): add Gogs support to /rebase and /reviewrebase#3

Draft
troglodyne-bot wants to merge 1 commit into
trogbot_live_codefrom
koan/gogs-rebase-skill
Draft

feat(skills): add Gogs support to /rebase and /reviewrebase#3
troglodyne-bot wants to merge 1 commit into
trogbot_live_codefrom
koan/gogs-rebase-skill

Conversation

@troglodyne-bot

Copy link
Copy Markdown
Owner

What

Adds Gogs PR URL support to the /rebase and /reviewrebase (/rr) skills on the trogbot_live_code branch.

Why

/pr and /review already handle Gogs URLs. /rebase and /rr were still GitHub-only — Gogs PRs would fall through to the "no valid PR URL" error.

How

  • /rebase: new _handle_gogs() helper extracts Gogs PR URL via gogs_url_parser.search_pr_url, then calls GogsForge.pr_view() to get headRefName for the branch-prefix ownership check (mirrors the is_own_pr GitHub path). Falls through to GitHub if no Gogs URL detected.
  • /reviewrebase: new _try_extract_gogs_pr() helper extracts the Gogs PR URL and queues both /review + /rebase missions with the Gogs URL. Same combo logic as GitHub, same duplicate/partial-queue messaging.

Both paths use try/except ValueError around search_pr_url so an unconfigured KOAN_GOGS_HOST silently falls through to GitHub handling.

Testing

  • 57 tests pass (49 existing + 8 new Gogs-specific)
  • New tests cover: queue success, foreign branch rejection, foreign branch allow via config, forge API error, combo ack, duplicate warning, unknown repo error
  • 3 pre-existing failures in test_awake.py and test_reset_parser.py are unrelated

🤖 Generated with Claude Code

Both skills now detect Gogs PR URLs (KOAN_GOGS_HOST-prefixed) before
falling through to GitHub handling:

- /rebase: uses GogsForge.pr_view() to fetch headRefName for the branch
  prefix ownership check (mirrors the is_own_pr GitHub path)
- /reviewrebase: extracts Gogs PR URL via gogs_url_parser.search_pr_url
  and queues both /review + /rebase missions (same combo logic as GitHub)

8 new tests (4 per skill) covering queue, ownership rejection, foreign
branch allow, forge error, combo ack, duplicate warning, and unknown repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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