This commit is contained in:
Jason Karns 2023-07-27 17:40:31 -04:00 committed by GitHub
commit a7d5b64f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,12 @@ function writeRegistryToFile(
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
scope = github.context.repo.owner;
}
if (!scope) {
let namePrefix = require('./package').name.match('@[^/]+');
if (namePrefix) {
scope = namePrefix[0];
}
}
if (scope && scope[0] != '@') {
scope = '@' + scope;
}