Fix ISSUE_PATTERN to handle Slack URL formats#59
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verification$ MISE_RUBY_VERSION=3.2 mise exec ruby -- bundle exec rspec
16 examples, 0 failures2 consecutive green runs confirmed. ISSUE_PATTERN unit tests
|
There was a problem hiding this comment.
Code Review
This pull request updates the ISSUE_PATTERN regular expression in lib/ruboty/handlers/github.rb to support protocol-stripped URLs and angle-bracketed URLs, along with adding comprehensive test coverage in spec/ruboty/handlers/github_spec.rb. Feedback suggests replacing the greedy wildcard (?<repo>.+) with (?<repo>[^/]+/[^/]+) to prevent incorrect domain parsing when owner names contain dots and to avoid potential backtracking performance issues.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
da247de to
4e6aa48
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request updates the ISSUE_PATTERN regular expression in the GitHub handler to support protocol-stripped and angle-bracketed URLs, and adds corresponding unit and integration tests. The review feedback highlights that Slack automatically formats protocol-stripped URLs with a pipe and display text (e.g., <url|text>), which will cause the pattern matching to fail due to the \z anchor in commands. The reviewer suggests updating the regex to handle this Slack link format and adding corresponding test cases to verify both the pattern matching and the #close_issue action.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
What
Closes #58
Why
How
Handle domain-without-protocol (
github.com/owner/repo/pull/123) via an alternative pattern[^/]+\.[^/]+/alongside the existinghttps?://[^/]+/.This pattern only matches strings containing a dot (
.), so it won't consumeowner/inowner/repo#123as a domain (GitHub usernames cannot contain dots).Non Goal
<url|text>pipe format is out of scope — the adapter layer parses it and passes only the display text to the handlerRefs