fix(kugetsu-session): extract_issue_ref_from_message fix URL parsing #178

Merged
shoko merged 1 commits from fix/issue-176-extract-issue-ref into main 2026-04-06 04:54:12 +02:00
Owner

Summary

  • Fix issue where full URLs like #158 were incorrectly parsed to shoko/kugetsu/issues#158 instead of git.fbrns.co/shoko/kugetsu#158
  • Issue #176 is duplicate of #174 (Bug 3) but the fix in #174 only addressed the deprecated parse_issue_ref_from_message() in kugetsu script, not the active extract_issue_ref_from_message() in kugetsu-session.sh

Changes

  • extract_issue_ref_from_message() now uses bash regex capture groups directly instead of fragile sed/cut pipeline
  • Correctly handles: https://instance/owner/repo/issues/158 → instance/owner/repo#158

Testing

git.fbrns.co/shoko/kugetsu#158 (from https:// URL)
git.fbrns.co/shoko/kugetsu#160 (from https:// URL with /pull/)
git.fbrns.co/shoko/kugetsu#158 (from bare URL without https://)
shoko/kugetsu#158 (from owner/repo#number format)

Closes #176

## Summary - Fix issue where full URLs like https://git.fbrns.co/shoko/kugetsu/issues/158 were incorrectly parsed to shoko/kugetsu/issues#158 instead of git.fbrns.co/shoko/kugetsu#158 - Issue #176 is duplicate of #174 (Bug 3) but the fix in #174 only addressed the deprecated parse_issue_ref_from_message() in kugetsu script, not the active extract_issue_ref_from_message() in kugetsu-session.sh ## Changes - extract_issue_ref_from_message() now uses bash regex capture groups directly instead of fragile sed/cut pipeline - Correctly handles: https://instance/owner/repo/issues/158 → instance/owner/repo#158 ## Testing git.fbrns.co/shoko/kugetsu#158 (from https:// URL) git.fbrns.co/shoko/kugetsu#160 (from https:// URL with /pull/) git.fbrns.co/shoko/kugetsu#158 (from bare URL without https://) shoko/kugetsu#158 (from owner/repo#number format) Closes #176
shoko added 1 commit 2026-04-06 04:52:23 +02:00
Fix issue where full URLs like #158
were incorrectly parsed to 'shoko/kugetsu/issues#158' instead of
'git.fbrns.co/shoko/kugetsu#158'.

The regex now correctly extracts instance, owner, repo, and number
using bash regex capture groups instead of fragile sed/cut pipeline.
han approved these changes 2026-04-06 04:53:39 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit 80a3228be9 into main 2026-04-06 04:54:12 +02:00
Sign in to join this conversation.