-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A task to search and report TODOs associated with closed issues #9182
Conversation
build-system/tasks/todos.js
Outdated
if (issueCache[issueId] !== undefined) { | ||
return Promise.resolve(issueCache[issueId]); | ||
} | ||
return githubRequest('/issues/' + issueId).then(response => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll make multiple requests to Github. Instead, you could cache this promise (instead of its resoled value).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
build-system/tasks/todos.js
Outdated
var GITHUB_ACCESS_TOKEN = process.env.GITHUB_ACCESS_TOKEN; | ||
|
||
/** @type {!Object<string, !Promise<number>>} */ | ||
var issueCache = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object.create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@erwinmombay Added to |
No description provided.