Open gordongli opened 6 years ago
I cannot replicate this. With MongoDB and SQLite configured, I run:
ruby -Ilib bin/ght-retrieve-repo -t token gousiosg github-mirror
I get the same output as your for commits
INFO, 2018-02-28T10:09:34+01:00, ghtorrent -- retriever.rb: Added commit gousiosg/github-mirror -> 2e5c6db4c5a5d39ba59d3101cad4051cda43fb02
INFO, 2018-02-28T10:09:34+01:00, ghtorrent -- api_client.rb: Successful request. URL: https://api.github.com/repos/gousiosg/github-mirror/commits/4704dfec4283d9c3721709a1e69fb6d1dc5c81d6?per_page=100, Remaining: 1562, Total: 487 ms
INFO, 2018-02-28T10:09:34+01:00, ghtorrent -- retriever.rb: Added commit gousiosg/github-mirror -> 4704dfec4283d9c3721709a1e69fb6d1dc5c81d6
INFO, 2018-02-28T10:09:35+01:00, ghtorrent -- ghtorrent.rb: Added commit gousiosg/github-mirror -> 7428d94cf62a0658b8c357750fa7e302ce709930
but different output for pull requests:
INFO, 2018-02-28T10:09:54+01:00, ghtorrent -- full_repo_retriever.rb: Stage: ensure_languages completed, Repo: gousiosg/github-mirror, Time: 455 ms
INFO, 2018-02-28T10:09:55+01:00, ghtorrent -- api_client.rb: Successful request. URL: https://api.github.com/repos/gousiosg/github-mirror/pulls?per_page=100, Remaining: 4981, Total: 599 ms
INFO, 2018-02-28T10:09:55+01:00, ghtorrent -- api_client.rb: Successful request. URL: https://api.github.com/repos/gousiosg/github-mirror/pulls?page=1&per_page=100, Remaining: 4980, Total: 492 ms
[...]
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added user Zearin
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added pull_req 1 (head deleted) -> gousiosg/github-mirror
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added pullreq_event (2) -> (opened) by (Zearin) timestamp 2013-11-24 16:56:19 UTC
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added pullreq_event (2) -> (merged) by (gousiosg) timestamp 2013-11-25 13:42:03 UTC
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added pullreq_event (2) -> (closed) by (gousiosg) timestamp 2013-11-25 13:42:03 UTC
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- api_client.rb: Successful request. URL: https://api.github.com/repos/gousiosg/github-mirror/pulls/1/commits?per_page=100, Remaining: 4942, Total: 523 ms
INFO, 2018-02-28T10:10:12+01:00, ghtorrent -- ghtorrent.rb: Added pullreq_commit e3933e58a614bd5487303260e9d1c39abb2e8c09 to gousiosg/github-mirror -> 1
Setting up MongoDB and using it as the persister fixed the issue. Would this be a bug or something to document?
When running
ght-retrieve-repo
, whilecommits
are successfully stored in the database,issues
,pull_requests
, etc. are fetched but not stored, even when providing the-y
option. I notice in the logs that whileghtorrent.rb
is being used to add commits to the database when retrieving them, this is not the case with the other entities.commits:
pull requests: