Skip to content

Commit

Permalink
fix(gh-pr): accept hyphens, underscores, and periods in PR path
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Aug 19, 2024
1 parent 1ef01eb commit 113fc85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public boolean test(URL url) {
try {
return ("http".equals(url.getProtocol()) || "https".equals(url.getProtocol()))
&& "github.com".equals(url.getHost())
&& url.getPath().matches("^/(?:[\\w]+)/(?:[\\w]+)/pull/(?:[\\d]+)$");
&& url.getPath().matches("/[\\w-_\\.]+/[\\w-_\\.]+/pull/[\\d]+/?");
} catch (Exception e) {
Log.trace(e);
return false;
Expand Down

0 comments on commit 113fc85

Please sign in to comment.