-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor repoIndex collection into a DB model #61
Conversation
client/src/components/Header.js
Outdated
@@ -39,6 +40,13 @@ export default class Header extends Component { | |||
|
|||
componentDidMount() { | |||
this.loadBasicRepoData() | |||
setInterval(() => { |
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.
I think it's better to put this setInterval
after fetchLatestIndex()
is done, as fetchLatestIndex()
would also involving getting the latest index.
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.
@woodpig07 Nice point! will do.
@@ -1,7 +1,16 @@ | |||
import GithubAPI from 'github-api' | |||
import _ from 'lodash' | |||
import Bluebird from 'bluebird' |
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.
Since you started using Bluebird, maybe it's better to replace all the native Promise with Bluebird in this file?
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.
Yes, it's my next step. Will leave it as it is now in this PR.
still WIP - DO NOT MERGELet me know if you want to collaborate, cause I may squash and force push commits.
[EDITED]
Ready to merge.
In this PR:
RepoFileEntry
is created to save individual file entrytipCommitSha
is added to modelRepoIndex
to track the tip commit of the branch/api/repository/updated-collections
is added, which will only response modified/removed entries