Skip to content

Commit

Permalink
Spike to default the scope from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns committed Feb 7, 2021
1 parent 05f0551 commit 20a965d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/authutil.ts
Original file line number Diff line number Diff line change
@@ -25,6 +25,9 @@ function writeRegistryToFile(
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
scope = github.context.repo.owner;
}
if (!scope && namePrefix = require('./package').name.match('@[^/]+')) {
scope = namePrefix[0];
}
if (scope && scope[0] != '@') {
scope = '@' + scope;
}

0 comments on commit 20a965d

Please sign in to comment.