summaryrefslogtreecommitdiffstatshomepage
path: root/bridge/github/import_query.go
diff options
context:
space:
mode:
authorAlexander Scharinger <rng.dynamics@gmail.com>2020-12-12 23:57:46 +0100
committerAlexander Scharinger <rng.dynamics@gmail.com>2020-12-12 23:57:46 +0100
commit0baf65cd6404219881fb6767b0fde2bf1bb12b75 (patch)
treec1dc981dd963556a575dcf98c16bb001ce7568b0 /bridge/github/import_query.go
parent61bfc51ebe4420982aa40e6b9d56d8ca114151c4 (diff)
downloadgit-bug-0baf65cd6404219881fb6767b0fde2bf1bb12b75.tar.gz
git-bug-0baf65cd6404219881fb6767b0fde2bf1bb12b75.zip
WIP: Pinpoint some of the reasons for bug #385
Work in progress. The github bridge contains a bug documented in issue #385. This commit shows what is the problem. There might be more problems. I have changed the GraphQL query for timeline items and there are much less wrong imports now. (Are there any malformed imports left?) I would like to rework the entire bridge/github/iterator in the near future in order to create a reliable fix for this bug.
Diffstat (limited to 'bridge/github/import_query.go')
-rw-r--r--bridge/github/import_query.go22
1 files changed, 19 insertions, 3 deletions
diff --git a/bridge/github/import_query.go b/bridge/github/import_query.go
index 58f6d95e..264f5c22 100644
--- a/bridge/github/import_query.go
+++ b/bridge/github/import_query.go
@@ -98,9 +98,10 @@ type timelineItem struct {
type issueTimeline struct {
authorEvent
- Title string
- Body githubv4.String
- Url githubv4.URI
+ Title string
+ Number githubv4.Int
+ Body githubv4.String
+ Url githubv4.URI
TimelineItems struct {
Edges []struct {
@@ -116,6 +117,21 @@ type issueTimeline struct {
} `graphql:"userContentEdits(last: $issueEditLast, before: $issueEditBefore)"`
}
+// Alex
+type timelineItemsQuery struct {
+ Repository struct {
+ Issue struct {
+ TimelineItems struct {
+ Edges []struct {
+ Cursor githubv4.String
+ Node timelineItem
+ }
+ PageInfo pageInfo
+ } `graphql:"timelineItems(first: $timelineFirst, after: $timelineAfter)"`
+ } `graphql:"issue(number: $issueNumber)"`
+ } `graphql:"repository(owner: $owner, name: $name)"`
+}
+
type issueEdit struct {
UserContentEdits struct {
Nodes []userContentEdit