default-branch
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -31,14 +31,13 @@ 'use strict'; | ||
try { | ||
const regexMatch = regexp.exec(data)[1]; | ||
// The first item (0) will be at the top and will be the default branch | ||
const regexMatch = data.match(regexp)[0].split('=')[1].split('"')[0]; | ||
return resolve(regexMatch); | ||
} catch (err) { | ||
reject(new Error('Failed to get default branch: ' + err)); | ||
return; | ||
return reject(new Error('Failed to get default branch: ' + err)); | ||
} | ||
}); | ||
}).on('error', (error) => { | ||
reject(error); | ||
return reject(error); | ||
}); | ||
}); | ||
}; |
{ | ||
"name": "default-branch", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Get the default branch of a GitHub repository", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4650
46