Skip to content
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

Github API problem due to pagination #75

Open
fport opened this issue Jan 23, 2021 · 4 comments
Open

Github API problem due to pagination #75

fport opened this issue Jan 23, 2021 · 4 comments
Assignees
Labels
bug Something isn't working mid level

Comments

@fport
Copy link
Member

fport commented Jan 23, 2021

Due to paging, the Github API pulls the data from page 1. We need all the issues.
For example https://github.com/expressjs/express/issues
Screenshot from 2021-01-23 14-27-20

-https://github.com/expressjs/express/issues?page=2&q=is%3Aissue+is%3Aopen

@fport fport added bug Something isn't working mid level labels Jan 23, 2021
@muraterzioglu
Copy link

muraterzioglu commented Jan 28, 2021

😋 API docs and example, tested via postman
https://docs.github.com/en/rest/reference/issues#list-repository-issues
https://api.github.com/repos/expressjs/express/issues?state=all&per_page=100&page=1

[ ] - Upgrade Database Scheme (Should be LAST)
[ ] - Sync Every Repo from GitHub

EXPERIMANTEL DB SCHEMA

{
  repoName: "RepoAdı",
  repoAuthor: "YazarAdı",
  issues: [ ... ],
  contributors : [ ... ],
  lastUpdate: "HH-MM",
}

@muraterzioglu
Copy link

muraterzioglu commented Jan 28, 2021

@mertcb will drop something about GitHub webhooks; possibly we can delete lastUpdate and start working with webhooks insteed

@mertcb
Copy link

mertcb commented Jan 28, 2021

If we do the sync process with webhooks, when repository gets an update, we can get new info and update the db.

check here: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads

@altaysimsek
Copy link
Member

@mertcb Bingo🎉 Webhooks can solve our problem when updating data on DB. Also, we need to improve our schema @muraterzioglu's one is really good for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mid level
Projects
None yet
Development

No branches or pull requests

4 participants