-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct the runIDFromURLRE
regex to properly match the callbackURL
#3495
Correct the runIDFromURLRE
regex to properly match the callbackURL
#3495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have caught this before (sorry about that), but this repo supports both public GitHub and enterprise GitHub installations, which means that we can't hard-code a domain name in a regex.
Instead of your change, we should simply remove the leading carat (^
) and then it should support both styles of URLs.
Please update this PR and then add a test for both styles of URLs showing that it should work on both. Thank you, @pputman-clabs.
runIDFromURLRE
regex to properly match the callbackURL
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3495 +/- ##
=======================================
Coverage 91.03% 91.03%
=======================================
Files 179 179
Lines 15574 15574
=======================================
Hits 14178 14178
Misses 1223 1223
Partials 173 173 ☔ View full report in Codecov by Sentry. |
…move the carat(^) to match any url, along with tests for both https://api.github.com along with a dummy url for enterprise Github
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more tweak, please, @pputman-clabs, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @pputman-clabs!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
@stevehipwell - might you have time for a code review? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you, @stevehipwell! |
the callbackURL from the event previously didn't match with the regex, and was always causing a "no match found error". This includes the full URL and should match.