Skip to content

Instantly share code, notes, and snippets.

@amCap1712
Last active August 26, 2021 10:15
Show Gist options
  • Save amCap1712/a98c794f4a05549dec73d1757f7cdf28 to your computer and use it in GitHub Desktop.
Save amCap1712/a98c794f4a05549dec73d1757f7cdf28 to your computer and use it in GitHub Desktop.
Identify commits on github with unrecognized github accounts
GET https://api.github.com/repos/openjdk/jdk/commits?per_page=3
Relevant docs: https://docs.github.com/en/rest/reference/repos#list-commits
[
{
"sha": "b94fd32f08bbb0012874eb918a4a1fe2d06eb943",
"node_id": "MDY6Q29tbWl0MTQ5MTIxOTU0OmI5NGZkMzJmMDhiYmIwMDEyODc0ZWI5MThhNGExZmUyZDA2ZWI5NDM=",
"commit": {
"author": {
"name": "Magnus Ihse Bursie",
"email": "ihse@openjdk.org",
"date": "2021-08-26T10:00:21Z"
},
"committer": {
"name": "Magnus Ihse Bursie",
"email": "ihse@openjdk.org",
"date": "2021-08-26T10:00:21Z"
},
"message": "8272859: Javadoc external links should only have feature version number in URL\n\nReviewed-by: iris",
"tree": {
"sha": "57f8885c74168a55a02e1e6f8322360b272da0e9",
"url": "https://api.github.com/repos/openjdk/jdk/git/trees/57f8885c74168a55a02e1e6f8322360b272da0e9"
},
"url": "https://api.github.com/repos/openjdk/jdk/git/commits/b94fd32f08bbb0012874eb918a4a1fe2d06eb943",
"comment_count": 1,
"verification": {
"verified": false,
"reason": "unsigned",
"signature": null,
"payload": null
}
},
"url": "https://api.github.com/repos/openjdk/jdk/commits/b94fd32f08bbb0012874eb918a4a1fe2d06eb943",
"html_url": "https://github.com/openjdk/jdk/commit/b94fd32f08bbb0012874eb918a4a1fe2d06eb943",
"comments_url": "https://api.github.com/repos/openjdk/jdk/commits/b94fd32f08bbb0012874eb918a4a1fe2d06eb943/comments",
"author": {
"login": "magicus",
"id": 6209108,
"node_id": "MDQ6VXNlcjYyMDkxMDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6209108?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/magicus",
"html_url": "https://github.com/magicus",
"followers_url": "https://api.github.com/users/magicus/followers",
"following_url": "https://api.github.com/users/magicus/following{/other_user}",
"gists_url": "https://api.github.com/users/magicus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/magicus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/magicus/subscriptions",
"organizations_url": "https://api.github.com/users/magicus/orgs",
"repos_url": "https://api.github.com/users/magicus/repos",
"events_url": "https://api.github.com/users/magicus/events{/privacy}",
"received_events_url": "https://api.github.com/users/magicus/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "magicus",
"id": 6209108,
"node_id": "MDQ6VXNlcjYyMDkxMDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6209108?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/magicus",
"html_url": "https://github.com/magicus",
"followers_url": "https://api.github.com/users/magicus/followers",
"following_url": "https://api.github.com/users/magicus/following{/other_user}",
"gists_url": "https://api.github.com/users/magicus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/magicus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/magicus/subscriptions",
"organizations_url": "https://api.github.com/users/magicus/orgs",
"repos_url": "https://api.github.com/users/magicus/repos",
"events_url": "https://api.github.com/users/magicus/events{/privacy}",
"received_events_url": "https://api.github.com/users/magicus/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"url": "https://api.github.com/repos/openjdk/jdk/commits/9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"html_url": "https://github.com/openjdk/jdk/commit/9166ba37b631aa7ae641488f6167cdbd7fcdff00"
}
]
},
{
"sha": "9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"node_id": "MDY6Q29tbWl0MTQ5MTIxOTU0OjkxNjZiYTM3YjYzMWFhN2FlNjQxNDg4ZjYxNjdjZGJkN2ZjZGZmMDA=",
"commit": {
"author": {
"name": "Tobias Hartmann",
"email": "thartmann@openjdk.org",
"date": "2021-08-26T08:34:46Z"
},
"committer": {
"name": "Tobias Hartmann",
"email": "thartmann@openjdk.org",
"date": "2021-08-26T08:34:46Z"
},
"message": "8272973: Incorrect compile command used by TestIllegalArrayCopyBeforeInfiniteLoop\n\nReviewed-by: chagedorn, jiefu, neliasso",
"tree": {
"sha": "4b9a04eb5894d397f069f021495a71c6dccf219c",
"url": "https://api.github.com/repos/openjdk/jdk/git/trees/4b9a04eb5894d397f069f021495a71c6dccf219c"
},
"url": "https://api.github.com/repos/openjdk/jdk/git/commits/9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"comment_count": 1,
"verification": {
"verified": false,
"reason": "unsigned",
"signature": null,
"payload": null
}
},
"url": "https://api.github.com/repos/openjdk/jdk/commits/9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"html_url": "https://github.com/openjdk/jdk/commit/9166ba37b631aa7ae641488f6167cdbd7fcdff00",
"comments_url": "https://api.github.com/repos/openjdk/jdk/commits/9166ba37b631aa7ae641488f6167cdbd7fcdff00/comments",
"author": {
"login": "TobiHartmann",
"id": 5312595,
"node_id": "MDQ6VXNlcjUzMTI1OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5312595?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TobiHartmann",
"html_url": "https://github.com/TobiHartmann",
"followers_url": "https://api.github.com/users/TobiHartmann/followers",
"following_url": "https://api.github.com/users/TobiHartmann/following{/other_user}",
"gists_url": "https://api.github.com/users/TobiHartmann/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TobiHartmann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TobiHartmann/subscriptions",
"organizations_url": "https://api.github.com/users/TobiHartmann/orgs",
"repos_url": "https://api.github.com/users/TobiHartmann/repos",
"events_url": "https://api.github.com/users/TobiHartmann/events{/privacy}",
"received_events_url": "https://api.github.com/users/TobiHartmann/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "TobiHartmann",
"id": 5312595,
"node_id": "MDQ6VXNlcjUzMTI1OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5312595?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TobiHartmann",
"html_url": "https://github.com/TobiHartmann",
"followers_url": "https://api.github.com/users/TobiHartmann/followers",
"following_url": "https://api.github.com/users/TobiHartmann/following{/other_user}",
"gists_url": "https://api.github.com/users/TobiHartmann/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TobiHartmann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TobiHartmann/subscriptions",
"organizations_url": "https://api.github.com/users/TobiHartmann/orgs",
"repos_url": "https://api.github.com/users/TobiHartmann/repos",
"events_url": "https://api.github.com/users/TobiHartmann/events{/privacy}",
"received_events_url": "https://api.github.com/users/TobiHartmann/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "49b2789a49e4e476dfcdf0a65e061a40264a4683",
"url": "https://api.github.com/repos/openjdk/jdk/commits/49b2789a49e4e476dfcdf0a65e061a40264a4683",
"html_url": "https://github.com/openjdk/jdk/commit/49b2789a49e4e476dfcdf0a65e061a40264a4683"
}
]
},
{
"sha": "49b2789a49e4e476dfcdf0a65e061a40264a4683",
"node_id": "MDY6Q29tbWl0MTQ5MTIxOTU0OjQ5YjI3ODlhNDllNGU0NzZkZmNkZjBhNjVlMDYxYTQwMjY0YTQ2ODM=",
"commit": {
"author": {
"name": "Alexey Ushakov",
"email": "avu@openjdk.org",
"date": "2021-08-26T07:28:26Z"
},
"committer": {
"name": "Alexey Ushakov",
"email": "avu@openjdk.org",
"date": "2021-08-26T07:28:26Z"
},
"message": "8262751: RenderPipelineState assertion error in J2DDemo\n\nReviewed-by: jdv",
"tree": {
"sha": "4b215c972e9b3e7713d9f637863bc3f5e10809b6",
"url": "https://api.github.com/repos/openjdk/jdk/git/trees/4b215c972e9b3e7713d9f637863bc3f5e10809b6"
},
"url": "https://api.github.com/repos/openjdk/jdk/git/commits/49b2789a49e4e476dfcdf0a65e061a40264a4683",
"comment_count": 1,
"verification": {
"verified": false,
"reason": "unsigned",
"signature": null,
"payload": null
}
},
"url": "https://api.github.com/repos/openjdk/jdk/commits/49b2789a49e4e476dfcdf0a65e061a40264a4683",
"html_url": "https://github.com/openjdk/jdk/commit/49b2789a49e4e476dfcdf0a65e061a40264a4683",
"comments_url": "https://api.github.com/repos/openjdk/jdk/commits/49b2789a49e4e476dfcdf0a65e061a40264a4683/comments",
"author": null,
"committer": null,
"parents": [
{
"sha": "a3308af0605bf936d9a9fb7093787a315ccc1e2a",
"url": "https://api.github.com/repos/openjdk/jdk/commits/a3308af0605bf936d9a9fb7093787a315ccc1e2a",
"html_url": "https://github.com/openjdk/jdk/commit/a3308af0605bf936d9a9fb7093787a315ccc1e2a"
}
]
}
]
@amCap1712
Copy link
Author

Screenshot (9)

@amCap1712
Copy link
Author

amCap1712 commented Aug 26, 2021

The third commit in the image is an octocat commit and the third commit in the json payload has "author": null. So, "author": null seems to imply that the author does not have a linked Github account to the email. Note that there are two "author", one directly inside each element and one inside the "commit" block inside each element. You want to check the outermost one for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment