Skip to content

Commit

Permalink
memoize getCommits
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Jul 31, 2020
1 parent 51b2261 commit f936268
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ export default class Git {
? this.options.graphqlBaseUrl || join(new URL(this.baseUrl).origin, "api")
: this.baseUrl;
this.logger.veryVerbose.info(`Initializing GitHub with: ${this.baseUrl}`);
const GitHub = Octokit.plugin(enterpriseCompatibility)
.plugin(retry)
.plugin(throttling);
const GitHub = Octokit.plugin(enterpriseCompatibility, retry, throttling);
this.github = new GitHub({
baseUrl: this.baseUrl,
auth: this.options.token,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export default class Release {
* @param from - Tag or SHA to start at
* @param to - Tag or SHA to end at (defaults to HEAD)
*/
@memoize()
async getCommits(from: string, to = "HEAD"): Promise<IExtendedCommit[]> {
this.logger.verbose.info(`Getting commits from ${from} to ${to}`);

Expand Down

0 comments on commit f936268

Please sign in to comment.