From d7cdb8e0544cfd4f85d8f7a731c5446a04b71c8a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 27 Jan 2016 02:26:47 -0500 Subject: [PATCH] Fix remote name matching for https remotes Closes #22 --- lib/heroku.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/heroku.js b/lib/heroku.js index 8e6b343..b751ed4 100644 --- a/lib/heroku.js +++ b/lib/heroku.js @@ -150,7 +150,11 @@ var Heroku = module.exports = (function() { return config[key].url && config[key].url.match(/heroku\.com/) }) .map(function(key) { - return config[key].url.match(/git@heroku\.com:(.*)\.git/)[1] + var name = config[key].url.match(/git@heroku\.com:(.*)\.git/) + if (name === null && typeof name === "object") { + name = config[key].url.match(/https:\/\/git\.heroku\.com\/(.*)\.git/) + } + return name[1] }) return cb(null, names)