Skip to content

Commit

Permalink
[release] username is no longer required for connecting to GitHub. Re…
Browse files Browse the repository at this point in the history
…solves #262
  • Loading branch information
aalmiray committed Jul 4, 2021
1 parent 416ffd9 commit 6484c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -84,7 +82,7 @@ class Github {
github = new GitHubBuilder()
.withConnector(new JReleaserHttpConnector(connectTimeout, readTimeout))
.withEndpoint(endpoint)
.withOAuthToken(password, username)
.withOAuthToken(token)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public void release() throws ReleaseException {
String changelog = context.getChangelog();

Github api = new Github(context.getLogger(),
github.getResolvedUsername(),
github.getResolvedToken(),
github.getConnectTimeout(),
github.getReadTimeout());
Expand Down

0 comments on commit 6484c1b

Please sign in to comment.