From c16d6699caad79609a897ceec9df4d323aefb4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Wed, 31 Jan 2018 15:37:31 +0100 Subject: [PATCH] GitHub: Fix repo detecting regexp The regular expression detecting the repository account+name didn't allow accounts & repo names containing dashes because of matching both those parts against the /\w+/ regexp. It was updated to match everything except the slash. This made the release script fail for jQuery Color. --- lib/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github.js b/lib/github.js index c61c223..e95864a 100644 --- a/lib/github.js +++ b/lib/github.js @@ -6,7 +6,7 @@ module.exports = function( Release ) { Release.define({ _githubApiPath: function( path ) { var repoUrl = Release._packageUrl( "bugs" ); - var repo = repoUrl.match( /github\.com\/(\w+\/\w+)/ )[ 1 ]; + var repo = repoUrl.match( /github\.com\/([^/]+\/[^/]+)/ )[ 1 ]; return "/repos/" + repo + "/" + path; },