Githawk: Missing commits

Created on 10 Mar 2019  ·  18Comments  ·  Source: GitHawkApp/GitHawk

GitHawk Upload by BasThomas

GitHawk Upload by BasThomas

And the various changes commit is available in the JSON...

{
  "data" : {
    "repository" : {
      "viewerCanAdminister" : true,
      "mergeCommitAllowed" : true,
      "squashMergeAllowed" : true,
      "mentionableUsers" : {
        "nodes" : [
          {
            "login" : "terhechte",
            "avatarUrl" : "https://avatars2.githubusercontent.com/u/132234?v=4",
            "__typename" : "User"
          },
          {
            "login" : "BasThomas",
            "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
            "__typename" : "User"
          }
        ],
        "__typename" : "UserConnection"
      },
      "defaultBranchRef" : {
        "name" : "master",
        "__typename" : "Ref"
      },
      "issueOrPullRequest" : {
        "milestone" : null,
        "locked" : false,
        "labels" : {
          "nodes" : [

          ],
          "__typename" : "LabelConnection"
        },
        "title" : "[WIP] Parse show notes",
        "__typename" : "PullRequest",
        "viewerCanReact" : true,
        "changedFiles" : 11,
        "deletions" : 44,
        "mergeStateStatus" : "CLEAN",
        "commits" : {
          "nodes" : [
            {
              "commit" : {
                "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjQ0ZTdhYWNjYjIzNzdjMzE1MGVhYWY4MzI5Y2ZhNTA4ODliMTJlMTM=",
                "status" : null,
                "__typename" : "Commit"
              },
              "__typename" : "PullRequestCommit"
            }
          ],
          "__typename" : "PullRequestCommitConnection"
        },
        "closed" : false,
        "viewerCanUpdate" : true,
        "createdAt" : "2018-09-28T11:16:41Z",
        "baseRefName" : "master",
        "mergeable" : "MERGEABLE",
        "body" : "This adds a format for show notes that will parse them to HTML.\r\n\r\nThe following format is expected:\r\n\r\n```\r\n# title\r\n- description1: url1\r\n- description2: url2\r\n\r\n- description3: url3\r\n\r\n# anotherTitle\r\n- description4: url4\r\n```\r\n\r\nThis will generate:\r\n\r\n```html\r\n<div>\r\n  <p>\r\n  <h3>title</h3>\r\n  <ul>\r\n    <li><a href=\"url1\">description1</a></li>\r\n    <li><a href=\"url2\">description2</a></li>\r\n  </ul>\r\n  <ul>\r\n    <li><a href=\"url3\">description3</a></li>\r\n  </ul>\r\n  </p>\r\n  <p>\r\n  <h3>anotherTitle</h3>\r\n  <ul>\r\n    <li><a href=\"url4\">description4</a></li>\r\n  </ul>\r\n  </p>\r\n<div>\r\n```",
        "timeline" : {
          "pageInfo" : {
            "hasPreviousPage" : false,
            "startCursor" : "MQ",
            "__typename" : "PageInfo"
          },
          "nodes" : [
            {
              "messageHeadline" : "Add .xcodeproj to gitignore",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjdiZTNiOWYxMjBkN2JkZGMzYjYxMTk2ZmRiZWFjNGJiOTNkNjY4MGQ=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "7be3b9f120d7bddc3b61196fdbeac4bb93d6680d"
            },
            {
              "messageHeadline" : "Add a newline at the end of the generated script",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OmNlYWU0NThkOTlkZjNiZDRjNDFkMmQ5YTQ1MzQzNWZkYmFlYmMxZDY=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "ceae458d99df3bd4c41d2d9a453435fdbaebc1d6"
            },
            {
              "messageHeadline" : "De-indent enum cases",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjQ2NDVjODQzOTQ0MzlkMzZhMzM0MGE5NWUyYzg5OTUzZGQ3ZDAxNTc=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "4645c84394439d36a3340a95e2c89953dd7d0157"
            },
            {
              "messageHeadline" : "Remove unnecessary print statement",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjgyNGZhODI5OWI4OGQ1ZTE0Nzc0MjMwMjE2Y2M0MTQ1ODEzZDEzZTE=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "824fa8299b88d5e14774230216cc4145813d13e1"
            },
            {
              "messageHeadline" : "Rename seperator to separator",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OmEwYTg3YmM4YjQxMGM0YzhiYjdiOTEyZmM2OWRiNzNjMWRjZWY0NDM=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "a0a87bc8b410c4c8bb7b912fc69db73c1dcef443"
            },
            {
              "messageHeadline" : "Parse formatted notes to html",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjI2ZGU0MzNkOTdiOWYyMDdmODdiOWNjZTBhNGJkNzgxZjg2M2NhYzU=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "26de433d97b9f207f87b9cce0a4bd781f863cac5"
            },
            {
              "messageHeadline" : "Generate masse.swift",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjMyMmRiMDhmOGMyZjQ1OGY5YWRkMDk1MzQzMmNmNGExMThiNGIzMzY=",
              "author" : {
                "user" : {
                  "login" : "BasThomas",
                  "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                  "__typename" : "User"
                },
                "__typename" : "GitActor"
              },
              "oid" : "322db08f8c2f458f9add0953432cf4a118b4b336"
            },
            {
              "id" : "MDEyOklzc3VlQ29tbWVudDQ2NjM3NDA3Ng==",
              "body" : "What happened to this? It still says [WIP]. Is it ready for review? :)",
              "viewerCanUpdate" : true,
              "author" : {
                "login" : "terhechte",
                "avatarUrl" : "https://avatars2.githubusercontent.com/u/132234?v=4",
                "__typename" : "User"
              },
              "viewerDidAuthor" : false,
              "reactionGroups" : [
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "THUMBS_UP"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "THUMBS_DOWN"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "LAUGH"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "HOORAY"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "CONFUSED"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "HEART"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "ROCKET"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "EYES"
                }
              ],
              "viewerCanReact" : true,
              "viewerCanDelete" : true,
              "editor" : null,
              "__typename" : "IssueComment",
              "lastEditedAt" : null,
              "createdAt" : "2019-02-22T12:02:31Z"
            },
            {
              "id" : "MDEyOklzc3VlQ29tbWVudDQ2NjUwMDk3Ng==",
              "body" : "Yeah not super happy with the code. It works in theory, but want to take another look at making this a bit less error prone / easier to expand on later",
              "viewerCanUpdate" : true,
              "author" : {
                "login" : "BasThomas",
                "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                "__typename" : "User"
              },
              "viewerDidAuthor" : true,
              "reactionGroups" : [
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "THUMBS_UP"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "THUMBS_DOWN"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "LAUGH"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "HOORAY"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "CONFUSED"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "HEART"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "ROCKET"
                },
                {
                  "__typename" : "ReactionGroup",
                  "viewerHasReacted" : false,
                  "users" : {
                    "nodes" : [

                    ],
                    "totalCount" : 0,
                    "__typename" : "ReactingUserConnection"
                  },
                  "content" : "EYES"
                }
              ],
              "viewerCanReact" : true,
              "viewerCanDelete" : true,
              "editor" : null,
              "__typename" : "IssueComment",
              "lastEditedAt" : null,
              "createdAt" : "2019-02-22T18:38:01Z"
            },
            {
              "messageHeadline" : "Implemented a simplified markdown parser for notes",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjIyNTkxNTc5NTc3MDgwZmJiNjA3YzdjNmI0MGNmMGVmMWU1YTFmZGI=",
              "author" : {
                "user" : null,
                "__typename" : "GitActor"
              },
              "oid" : "22591579577080fbb607c7c6b40cf0ef1e5a1fdb"
            },
            {
              "author" : {
                "login" : "BasThomas",
                "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
                "__typename" : "User"
              },
              "editor" : {
                "login" : "BasThomas",
                "__typename" : "User"
              },
              "submittedAt" : "2019-03-08T20:23:29Z",
              "id" : "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MjEyNDYxNzcz",
              "comments" : {
                "totalCount" : 7,
                "__typename" : "PullRequestReviewCommentConnection"
              },
              "lastEditedAt" : "2019-03-08T20:23:39Z",
              "viewerDidAuthor" : true,
              "createdAt" : "2019-03-08T20:18:29Z",
              "body" : "So cool! Hope to get some time during the weekend to take another look and play with it. Thanks @terhechte!",
              "__typename" : "PullRequestReview",
              "state" : "COMMENTED"
            },
            {
              "messageHeadline" : "Various Changes",
              "__typename" : "Commit",
              "id" : "MDY6Q29tbWl0MTQ1MzIyMTc3OjQ0ZTdhYWNjYjIzNzdjMzE1MGVhYWY4MzI5Y2ZhNTA4ODliMTJlMTM=",
              "author" : {
                "user" : null,
                "__typename" : "GitActor"
              },
              "oid" : "44e7aaccb2377c3150eaaf8329cfa50889b12e13"
            }
          ],
          "__typename" : "PullRequestTimelineConnection"
        },
        "viewerDidAuthor" : true,
        "id" : "MDExOlB1bGxSZXF1ZXN0MjE4OTM0OTIz",
        "number" : 1,
        "reviewRequests" : {
          "nodes" : [

          ],
          "__typename" : "ReviewRequestConnection"
        },
        "reactionGroups" : [
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "THUMBS_UP"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "THUMBS_DOWN"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "LAUGH"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "HOORAY"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "CONFUSED"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "HEART"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "ROCKET"
          },
          {
            "__typename" : "ReactionGroup",
            "viewerHasReacted" : false,
            "users" : {
              "nodes" : [

              ],
              "totalCount" : 0,
              "__typename" : "ReactingUserConnection"
            },
            "content" : "EYES"
          }
        ],
        "additions" : 443,
        "editor" : null,
        "assignees" : {
          "nodes" : [

          ],
          "__typename" : "UserConnection"
        },
        "merged" : false,
        "author" : {
          "login" : "BasThomas",
          "avatarUrl" : "https://avatars0.githubusercontent.com/u/4190298?v=4",
          "__typename" : "User"
        },
        "lastEditedAt" : null
      },
      "hasIssuesEnabled" : true,
      "rebaseMergeAllowed" : true,
      "__typename" : "Repository",
      "name" : "masse"
    }
  }
}
Bug Report Dump (Auto-generated)
Version 1.27.1 (1546622353)
Device: iPhone X (iOS 12.1.4)
TestFlight: true

🐛 bug

Most helpful comment

Quick info @wayni208 @BasThomas : If you look at "https://github.com/Contravariance/masse/pull/1/commits" you'll see that there're two different types of commits done by me. All of those commits were done with porcelain git (git commit -m etc). However, they were done on different machines.

What happened is that that the weird commits were created on my work machine and there my git identity is the one from our internal enterprise github, so it did not match the identity from my public github. What's confusing me is that this used to work properly, but somehow I apparently broke this. I just checked a couple of my other projects, and they all have the same issue: Commits done on my work machine can't be attributed because the identity doesn't match. Sorry about this kerfuffle!

All 18 comments

2527 dupe?

Sent with GitHawk

Yeah think so! Let me add the JSON to that other issue once I have access to a computer and I’ll close afterwards.

Sent with GitHawk

I’ll dig in to this one if that’s ok?

Sent with GitHawk

@wayni208 look at #2527, May have other info.
This is a dupe if that

Sent with GitHawk

Are you guys able to use the search field on the search tab in the simulator? It just flashes for me and won't take or accept any text input or paste. I'm running on the current master and I have tried a couple different simulators. I have yet to try on my device.

Contravariance/masse#1

Sent with GitHawk

Same happens to me. Works on iPad sim. 👌

Sent with GitHawk

This is a strange one and I think it is a problem on GitHub's end. The JSON shows "null" for the user field in the missing commits. This happens with both of these issues. GitHawk gets the null and can't append the info it gets from AutoCompleteUser, presenting nothing in the timeline. GitHub gets the null and uses a default avatar image in the timeline.

From #2527

This is the JSON for this specific commit.
fkling-json

This is how it is displayed on GitHub.
fkling-github

From #2677

This is the JSON for this specific commit.
contravariance-json

This is how it is displayed on GitHub.
contravariance-details

And a little more detail. The "user" cannot be found or identified until you click on this commit and view the file.
contravariance-github-details

So... I think the best option is to figure out how to provide a canned image such as GitHub does when a user can't be found. This will give us visibility to the commit in the same way.

That seems like a good approach. Not sure if we should make all commit objects (or those that display commits) have an optional user. Maybe a "non-author commit" vs a "author commit"?

@BasThomas correct me if I’m wrong, but to make a new “non-author commit” object I would need to modify IssueOrPullRequest.graphql right?

Sent with GitHawk

Hm, I’m not sure. But you’d have to be able to decode the JSON to such an object.

Sent with GitHawk

I think I may have had a revelation or two, thanks.

Sent with GitHawk

@BasThomas still working on this. I’m learning a lot even though I’ve not made much progress, anyway. 😉Just curious, when you were working on your Contravariance repo, did you use two separate methods to do your commits? Like Xcode for some, git command line for others, for instance? If so, can you recall which you used for the missing commits?

So, anyway, we aren’t even noticing this is a commit because login is ultimately blank, or null. I’m trying to pass in “name” as it should, at least, have some content no matter what. I left off last night where I was successfully seeing this (name, Mr. Bas Broek) on viewable commits. I believe that I have to now create a new NonUser commit model, cell, and section controller to display this correctly and with a default image. Maybe I’m way off here? I second guess myself as I wonder why you flagged this as a good first issue as if it was an easier fix than what I am proposing.

Awesome you're still looking into this!

I don't know what kind of commits they are exactly — @terhechte knows more 😉

So, anyway, we aren’t even noticing this is a commit because login is ultimately blank, or null. I’m trying to pass in “name” as it should, at least, have some content no matter what.

Can we not just count it as a, as you suggested, NonUser-commit model without a name/user? Just a commit that was pushed?

I second guess myself as I wonder why you flagged this as a good first issue as if it was an easier fix than what I am proposing.

Sorry, that was never the intention! I felt like this could be a task to pick up as there was quite a bit of information available. That said, I think you're on the right path! I've removed the label 😃

Feel free to open a (draft) pull request with your current progress if you'd like some help, or even leave it there if you feel like you want to pick up something else. :)

Lol 🙂

So the commits I’m referring would be the “Various Changes” and the one immediately before that which you made. I found some info which said the “User” field would return “null” if the commit was made without an email configured and “Name” should return “unknown” or a name. So, simply to satisfy my curiosity, I was wondering if you were pushing commits via multiple ways.

And you didn’t have to remove the tag. Newbie status is still appropriate! 😂 But I do appreciate the clarification on the meaning behind the tag from your perspective.

I’m going to tinker around with it some more tonight and try again as you have suggested. I had a failed attempt at it earlier but have been reading up on null types in GraphQL and hope to have a better result. I’ll likely do as you have offered and submit a draft PR as well.

I appreciate your patience, Bas. There is a lot for me to learn and I’m having fun. If I ever become a PITA please let me know. 🙂

Sent with GitHawk

Awesome, thanks for the feedback! Super happy to hear you're enjoying it and learning things. And don't worry about becoming a pain in the ass... you're more than fine!

Quick info @wayni208 @BasThomas : If you look at "https://github.com/Contravariance/masse/pull/1/commits" you'll see that there're two different types of commits done by me. All of those commits were done with porcelain git (git commit -m etc). However, they were done on different machines.

What happened is that that the weird commits were created on my work machine and there my git identity is the one from our internal enterprise github, so it did not match the identity from my public github. What's confusing me is that this used to work properly, but somehow I apparently broke this. I just checked a couple of my other projects, and they all have the same issue: Commits done on my work machine can't be attributed because the identity doesn't match. Sorry about this kerfuffle!

Thanks @BasThomas and @terhechte. Hopefully I can get back to this and get something for you to look at this weekend.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

viktorgardart picture viktorgardart  ·  3Comments

BasThomas picture BasThomas  ·  3Comments

weyert picture weyert  ·  3Comments

jessesquires picture jessesquires  ·  3Comments

rnystrom picture rnystrom  ·  3Comments