Skip to content

Commit

Permalink
Merge pull request #130 from orta/no_leaking_tokens
Browse files Browse the repository at this point in the history
Changes the verbose logging so that it doesn't leak tokens
  • Loading branch information
hipstersmoothie authored Jan 4, 2019
2 parents 140ecc1 + ded5bc2 commit 3d256aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/github-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,18 @@ export default class GitHubRelease {
args.baseUrl = this.githubApi;
}

this.logger.verbose.info('Initializing GitHub API with:\n', args);
// So that --verbose can be used on public CIs
const tokenlessArgs = {
...args,
token: args.token
? `[Token starting with ${args.token.substring(0, 4)}]`
: undefined
};

this.logger.verbose.info(
'Initializing GitHub API with:\n',
tokenlessArgs
);
this.github = Promise.resolve(new GitHub(args));
} else {
this.logger.verbose.info('Getting repo information from package.json');
Expand Down

0 comments on commit 3d256aa

Please sign in to comment.