[release] username is no longer required for connecting to GitHub. Resolves #262

This commit is contained in:
Andres Almiray
2021-07-04 18:35:14 +02:00
parent 416ffd9530
commit 6484c1bf91
2 changed files with 4 additions and 7 deletions

View File

@@ -62,17 +62,15 @@ class Github {
private final GitHub github;
Github(JReleaserLogger logger,
String username,
String password,
String token,
int connectTimeout,
int readTimeout) throws IOException {
this(logger, ENDPOINT, username, password, connectTimeout, readTimeout);
this(logger, ENDPOINT, token, connectTimeout, readTimeout);
}
Github(JReleaserLogger logger,
String endpoint,
String username,
String password,
String token,
int connectTimeout,
int readTimeout) throws IOException {
this.logger = logger;
@@ -84,7 +82,7 @@ class Github {
github = new GitHubBuilder()
.withConnector(new JReleaserHttpConnector(connectTimeout, readTimeout))
.withEndpoint(endpoint)
.withOAuthToken(password, username)
.withOAuthToken(token)
.build();
}

View File

@@ -57,7 +57,6 @@ public class GithubReleaser implements Releaser {
String changelog = context.getChangelog();
Github api = new Github(context.getLogger(),
github.getResolvedUsername(),
github.getResolvedToken(),
github.getConnectTimeout(),
github.getReadTimeout());