module.exports = function(remote, url) {
    var repoPattern = /github.com(?:[:\/])([^\/]+)\/(.+?)\.git$/;
    var result = repoPattern.exec(url);
    if (!result) {
        throw new Error("the remote '" + remote+ "' is not configured to a github repository");
    }
    return {
        owner: result[1],
        project: result[2]
    };
};

module.exports = function(remote, url) {
    var repoPattern = /github.com(?:[:\/])([^\/]+)\/(.+?)(?:\.git)?$/;
    var result = repoPattern.exec(url);
    if (!result) {
        throw new Error("the remote '" + remote+ "' is not configured to a github repository");
    }
    return {
        owner: result[1],
        project: result[2]
    };
};

Allow plain URLs, without .git at the end
Allow plain URLs, without .git at the end
