Skip to content

Commit b395b47

Browse files
authored
Spike to default the scope from package.json
1 parent 83c9f7a commit b395b47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/authutil.ts

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ function writeRegistryToFile(
2525
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
2626
scope = github.context.repo.owner;
2727
}
28+
if (!scope && namePrefix = require('./package').name.match('@[^/]+')) {
29+
scope = namePrefix[0]
30+
}
2831
if (scope && scope[0] != '@') {
2932
scope = '@' + scope;
3033
}

0 commit comments

Comments
 (0)