File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
tools/samm-cli/src/main/java/org/eclipse/esmf Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ protected List<ResolutionStrategy> configuredStrategies() {
90
90
}
91
91
92
92
private Optional <GithubModelSourceConfig > buildGithubModelSourceConfig (
93
- final ResolverConfigurationMixin .GitHubResolverOptions options , final String gitHubToken ) {
93
+ final ResolverConfigurationMixin .GitHubResolverOptions options , final String globalGitHubToken ) {
94
94
if ( options .gitHubName == null ) {
95
95
return Optional .empty ();
96
96
}
@@ -104,7 +104,7 @@ private Optional<GithubModelSourceConfig> buildGithubModelSourceConfig(
104
104
return Optional .of ( GithubModelSourceConfigBuilder .builder ()
105
105
.repository ( repository )
106
106
.directory ( options .gitHubDirectory )
107
- .token ( gitHubToken )
107
+ .token ( options . token != null ? globalGitHubToken : options . token )
108
108
.build () );
109
109
}
110
110
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ public static class GitHubResolverOptions {
62
62
description = "Set the GitHub tag"
63
63
)
64
64
public String gitHubTag = null ;
65
+
66
+ @ CommandLine .Option (
67
+ names = { "--token" , "-gt" },
68
+ description = "Set the GitHub token for the specific repository"
69
+ )
70
+ public String token = null ;
65
71
}
66
72
67
73
// This option is intentionally outside the GitHubResolverOptions argument group so it can be used when resolving Aspect Models
You can’t perform that action at this time.
0 commit comments