Skip to content

Instantly share code, notes, and snippets.

@vanga
Last active October 27, 2022 11:31
Show Gist options
  • Save vanga/c8c99ac032f14ae15172148df792639c to your computer and use it in GitHub Desktop.
Save vanga/c8c99ac032f14ae15172148df792639c to your computer and use it in GitHub Desktop.
Github sample events

Comment created event

{
    "id": "23931145678",
    "type": "IssueCommentEvent",
    "actor": {
        "id": 15520739,
        "login": "abtExp",
        "display_login": "abtExp",
        "gravatar_id": "",
        "url": "https://api.github.com/users/abtExp",
        "avatar_url": "https://avatars.githubusercontent.com/u/15520739?"
    },
    "repo": {
        "id": 170284360,
        "name": "run-youngjoo/SC-FEGAN",
        "url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN"
    },
    "payload": {
        "action": "created",
        "issue": {
            "url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22",
            "repository_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN",
            "labels_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22/labels{/name}",
            "comments_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22/comments",
            "events_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22/events",
            "html_url": "https://github.com/run-youngjoo/SC-FEGAN/issues/22",
            "id": 417905470,
            "node_id": "MDU6SXNzdWU0MTc5MDU0NzA=",
            "number": 22,
            "title": "Extract Masked Image",
            "user": {
                "login": "koolcoder007",
                "id": 29821373,
                "node_id": "MDQ6VXNlcjI5ODIxMzcz",
                "avatar_url": "https://avatars.githubusercontent.com/u/29821373?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/koolcoder007",
                "html_url": "https://github.com/koolcoder007",
                "followers_url": "https://api.github.com/users/koolcoder007/followers",
                "following_url": "https://api.github.com/users/koolcoder007/following{/other_user}",
                "gists_url": "https://api.github.com/users/koolcoder007/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/koolcoder007/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/koolcoder007/subscriptions",
                "organizations_url": "https://api.github.com/users/koolcoder007/orgs",
                "repos_url": "https://api.github.com/users/koolcoder007/repos",
                "events_url": "https://api.github.com/users/koolcoder007/events{/privacy}",
                "received_events_url": "https://api.github.com/users/koolcoder007/received_events",
                "type": "User",
                "site_admin": false
            },
            "labels": [],
            "state": "open",
            "locked": false,
            "assignee": null,
            "assignees": [],
            "milestone": null,
            "comments": 19,
            "created_at": "2019-03-06T16:48:12Z",
            "updated_at": "2022-09-10T15:09:39Z",
            "closed_at": null,
            "author_association": "NONE",
            "active_lock_reason": null,
            "body": "Appreciate if anyone would let me know how can we extracted only masked part of image from the edited image in the UI ?",
            "reactions": {
                "url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22/reactions",
                "total_count": 0,
                "+1": 0,
                "-1": 0,
                "laugh": 0,
                "hooray": 0,
                "confused": 0,
                "heart": 0,
                "rocket": 0,
                "eyes": 0
            },
            "timeline_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22/timeline",
            "performed_via_github_app": null,
            "state_reason": null
        },
        "comment": {
            "url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/comments/1242749247",
            "html_url": "https://github.com/run-youngjoo/SC-FEGAN/issues/22#issuecomment-1242749247",
            "issue_url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/22",
            "id": 1242749247,
            "node_id": "IC_kwDOCiZVSM5KEtk_",
            "user": {
                "login": "abtExp",
                "id": 15520739,
                "node_id": "MDQ6VXNlcjE1NTIwNzM5",
                "avatar_url": "https://avatars.githubusercontent.com/u/15520739?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/abtExp",
                "html_url": "https://github.com/abtExp",
                "followers_url": "https://api.github.com/users/abtExp/followers",
                "following_url": "https://api.github.com/users/abtExp/following{/other_user}",
                "gists_url": "https://api.github.com/users/abtExp/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/abtExp/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/abtExp/subscriptions",
                "organizations_url": "https://api.github.com/users/abtExp/orgs",
                "repos_url": "https://api.github.com/users/abtExp/repos",
                "events_url": "https://api.github.com/users/abtExp/events{/privacy}",
                "received_events_url": "https://api.github.com/users/abtExp/received_events",
                "type": "User",
                "site_admin": false
            },
            "created_at": "2022-09-10T15:09:39Z",
            "updated_at": "2022-09-10T15:09:39Z",
            "author_association": "NONE",
            "body": "@Papirapi , hey, i abandoned this project a long time ago, but luckily found the code files i was working on. Though a fair warning, the code was incomplete with several links missing and a lot of bugs. But will provide a general implementation of loss functions, the discriminator and generator and other utility functions. feel free to build up on this. Sorry, i didn't get time to make this a finished project. Hopefully you'll be able to implement it and get it done. But i'd recommend looking into newer approaches. All the best.👍",
            "reactions": {
                "url": "https://api.github.com/repos/run-youngjoo/SC-FEGAN/issues/comments/1242749247/reactions",
                "total_count": 0,
                "+1": 0,
                "-1": 0,
                "laugh": 0,
                "hooray": 0,
                "confused": 0,
                "heart": 0,
                "rocket": 0,
                "eyes": 0
            },
            "performed_via_github_app": null
        }
    },
    "public": true,
    "created_at": "2022-09-10T15:09:40Z"
}

Issue opened event (old events are of different format, refer next example)

{
    "id": "23931087587",
    "type": "IssuesEvent",
    "actor": {
        "id": 20846105,
        "login": "ourarash",
        "display_login": "ourarash",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ourarash",
        "avatar_url": "https://avatars.githubusercontent.com/u/20846105?"
    },
    "repo": {
        "id": 534783067,
        "name": "EdoToji/CECS-491A-Project",
        "url": "https://api.github.com/repos/EdoToji/CECS-491A-Project"
    },
    "payload": {
        "action": "opened",
        "issue": {
            "url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1",
            "repository_url": "https://api.github.com/repos/EdoToji/CECS-491A-Project",
            "labels_url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1/labels{/name}",
            "comments_url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1/comments",
            "events_url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1/events",
            "html_url": "https://github.com/EdoToji/CECS-491A-Project/issues/1",
            "id": 1368646113,
            "node_id": "I_kwDOH-AkW85Rk-Hh",
            "number": 1,
            "title": "Please convert your RFP and PRD files to markdown files.",
            "user": {
                "login": "ourarash",
                "id": 20846105,
                "node_id": "MDQ6VXNlcjIwODQ2MTA1",
                "avatar_url": "https://avatars.githubusercontent.com/u/20846105?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/ourarash",
                "html_url": "https://github.com/ourarash",
                "followers_url": "https://api.github.com/users/ourarash/followers",
                "following_url": "https://api.github.com/users/ourarash/following{/other_user}",
                "gists_url": "https://api.github.com/users/ourarash/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/ourarash/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/ourarash/subscriptions",
                "organizations_url": "https://api.github.com/users/ourarash/orgs",
                "repos_url": "https://api.github.com/users/ourarash/repos",
                "events_url": "https://api.github.com/users/ourarash/events{/privacy}",
                "received_events_url": "https://api.github.com/users/ourarash/received_events",
                "type": "User",
                "site_admin": false
            },
            "labels": [],
            "state": "open",
            "locked": false,
            "assignee": null,
            "assignees": [],
            "milestone": null,
            "comments": 0,
            "created_at": "2022-09-10T15:00:11Z",
            "updated_at": "2022-09-10T15:00:11Z",
            "closed_at": null,
            "author_association": "NONE",
            "active_lock_reason": null,
            "body": "Use this as a guide:\r\n\r\nhttps://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax",
            "reactions": {
                "url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1/reactions",
                "total_count": 0,
                "+1": 0,
                "-1": 0,
                "laugh": 0,
                "hooray": 0,
                "confused": 0,
                "heart": 0,
                "rocket": 0,
                "eyes": 0
            },
            "timeline_url": "https://api.github.com/repos/EdoToji/CECS-491A-Project/issues/1/timeline",
            "performed_via_github_app": null,
            "state_reason": null
        }
    },
    "public": true,
    "created_at": "2022-09-10T15:00:12Z"
}

Issue opened old event

[{
  "type": "IssuesEvent",
  "public": "true",
  "payload": "{\"action\":\"opened\",\"issue\":37587024,\"number\":80}",
  "repo": {
    "id": "2401600",
    "name": "shred",
    "url": "https://github.com/pandastrike/shred"
  },
  "actor": {
    "id": null,
    "login": "NickPadilla",
    "gravatar_id": "9da81f6d1b8142fdaa71a750c144bb59",
    "avatar_url": null,
    "url": null
  },
  "org": {
    "id": null,
    "login": "pandastrike",
    "gravatar_id": null,
    "avatar_url": null,
    "url": null
  },
  "created_at": "2014-07-10 17:47:38.000000 UTC",
  "id": null,
  "other": "{\"repository\":{\"description\":\"A Node.js HTTP Client\",\"homepage\":\"\",\"watchers\":239,\"stargazers\":239,\"forks\":40,\"fork\":false,\"size\":2239,\"owner\":\"pandastrike\",\"private\":false,\"open_issues\":13,\"has_issues\":true,\"has_downloads\":true,\"has_wiki\":true,\"language\":\"JavaScript\",\"created_at\":\"2011-09-16T12:56:23-07:00\",\"pushed_at\":\"2014-05-27T13:20:43-07:00\",\"master_branch\":\"master\",\"organization\":\"pandastrike\"},\"actor_attributes\":{\"type\":\"User\",\"name\":\"Nick Padilla\",\"company\":\"Monster Software LLC\",\"blog\":\"http://www.monstersoftwarellc.com\",\"location\":\"New Mexico\",\"email\":\"3b9de09f2ff76afe9f0ad4fcae4ff68f52ec7fc4@monstersoftwarellc.com\"},\"url\":\"https://github.com/pandastrike/shred/issues/80\"}"
}]

Issue closed event

{
    "id": "23931281898",
    "type": "IssuesEvent",
    "actor": {
        "id": 3339062,
        "login": "grzkv",
        "display_login": "grzkv",
        "gravatar_id": "",
        "url": "https://api.github.com/users/grzkv",
        "avatar_url": "https://avatars.githubusercontent.com/u/3339062?"
    },
    "repo": {
        "id": 151075425,
        "name": "bookingcom/carbonapi",
        "url": "https://api.github.com/repos/bookingcom/carbonapi"
    },
    "payload": {
        "action": "closed",
        "issue": {
            "url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201",
            "repository_url": "https://api.github.com/repos/bookingcom/carbonapi",
            "labels_url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201/labels{/name}",
            "comments_url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201/comments",
            "events_url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201/events",
            "html_url": "https://github.com/bookingcom/carbonapi/issues/201",
            "id": 491635835,
            "node_id": "MDU6SXNzdWU0OTE2MzU4MzU=",
            "number": 201,
            "title": "Use golangci-lint in travis",
            "user": {
                "login": "jwkohnen",
                "id": 17071775,
                "node_id": "MDQ6VXNlcjE3MDcxNzc1",
                "avatar_url": "https://avatars.githubusercontent.com/u/17071775?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/jwkohnen",
                "html_url": "https://github.com/jwkohnen",
                "followers_url": "https://api.github.com/users/jwkohnen/followers",
                "following_url": "https://api.github.com/users/jwkohnen/following{/other_user}",
                "gists_url": "https://api.github.com/users/jwkohnen/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/jwkohnen/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/jwkohnen/subscriptions",
                "organizations_url": "https://api.github.com/users/jwkohnen/orgs",
                "repos_url": "https://api.github.com/users/jwkohnen/repos",
                "events_url": "https://api.github.com/users/jwkohnen/events{/privacy}",
                "received_events_url": "https://api.github.com/users/jwkohnen/received_events",
                "type": "User",
                "site_admin": false
            },
            "labels": [],
            "state": "closed",
            "locked": false,
            "assignee": null,
            "assignees": [],
            "milestone": null,
            "comments": 1,
            "created_at": "2019-09-10T12:17:03Z",
            "updated_at": "2022-09-10T15:33:05Z",
            "closed_at": "2022-09-10T15:33:05Z",
            "author_association": "MEMBER",
            "active_lock_reason": null,
            "body": "Travis should run golangci-lint. As of now the travis script would have to manually install the binary. \r\n\r\nThe make target \"lint\" may be used.\r\n\r\n/depends on #189 \r\n",
            "reactions": {
                "url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201/reactions",
                "total_count": 1,
                "+1": 1,
                "-1": 0,
                "laugh": 0,
                "hooray": 0,
                "confused": 0,
                "heart": 0,
                "rocket": 0,
                "eyes": 0
            },
            "timeline_url": "https://api.github.com/repos/bookingcom/carbonapi/issues/201/timeline",
            "performed_via_github_app": null,
            "state_reason": "completed"
        }
    },
    "public": true,
    "created_at": "2022-09-10T15:33:05Z",
    "org": {
        "id": 7797465,
        "login": "bookingcom",
        "gravatar_id": "",
        "url": "https://api.github.com/orgs/bookingcom",
        "avatar_url": "https://avatars.githubusercontent.com/u/7797465?"
    }
}

Issue reopened event

{
    "id": "23931283262",
    "type": "IssuesEvent",
    "actor": {
        "id": 83959536,
        "login": "brixxt27",
        "display_login": "brixxt27",
        "gravatar_id": "",
        "url": "https://api.github.com/users/brixxt27",
        "avatar_url": "https://avatars.githubusercontent.com/u/83959536?"
    },
    "repo": {
        "id": 522856969,
        "name": "brixxt27/philosophers",
        "url": "https://api.github.com/repos/brixxt27/philosophers"
    },
    "payload": {
        "action": "reopened",
        "issue": {
            "url": "https://api.github.com/repos/brixxt27/philosophers/issues/9",
            "repository_url": "https://api.github.com/repos/brixxt27/philosophers",
            "labels_url": "https://api.github.com/repos/brixxt27/philosophers/issues/9/labels{/name}",
            "comments_url": "https://api.github.com/repos/brixxt27/philosophers/issues/9/comments",
            "events_url": "https://api.github.com/repos/brixxt27/philosophers/issues/9/events",
            "html_url": "https://github.com/brixxt27/philosophers/issues/9",
            "id": 1368654287,
            "node_id": "I_kwDOHyoqCc5RlAHP",
            "number": 9,
            "title": "./philo 3 610 200 200 일 때 죽음",
            "user": {
                "login": "brixxt27",
                "id": 83959536,
                "node_id": "MDQ6VXNlcjgzOTU5NTM2",
                "avatar_url": "https://avatars.githubusercontent.com/u/83959536?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/brixxt27",
                "html_url": "https://github.com/brixxt27",
                "followers_url": "https://api.github.com/users/brixxt27/followers",
                "following_url": "https://api.github.com/users/brixxt27/following{/other_user}",
                "gists_url": "https://api.github.com/users/brixxt27/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/brixxt27/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/brixxt27/subscriptions",
                "organizations_url": "https://api.github.com/users/brixxt27/orgs",
                "repos_url": "https://api.github.com/users/brixxt27/repos",
                "events_url": "https://api.github.com/users/brixxt27/events{/privacy}",
                "received_events_url": "https://api.github.com/users/brixxt27/received_events",
                "type": "User",
                "site_admin": false
            },
            "labels": [
                {
                    "id": 4408610174,
                    "node_id": "LA_kwDOHyoqCc8AAAABBsYNfg",
                    "url": "https://api.github.com/repos/brixxt27/philosophers/labels/bug",
                    "name": "bug",
                    "color": "d73a4a",
                    "default": true,
                    "description": "Something isn't working"
                }
            ],
            "state": "open",
            "locked": false,
            "assignee": {
                "login": "brixxt27",
                "id": 83959536,
                "node_id": "MDQ6VXNlcjgzOTU5NTM2",
                "avatar_url": "https://avatars.githubusercontent.com/u/83959536?v=4",
                "gravatar_id": "",
                "url": "https://api.github.com/users/brixxt27",
                "html_url": "https://github.com/brixxt27",
                "followers_url": "https://api.github.com/users/brixxt27/followers",
                "following_url": "https://api.github.com/users/brixxt27/following{/other_user}",
                "gists_url": "https://api.github.com/users/brixxt27/gists{/gist_id}",
                "starred_url": "https://api.github.com/users/brixxt27/starred{/owner}{/repo}",
                "subscriptions_url": "https://api.github.com/users/brixxt27/subscriptions",
                "organizations_url": "https://api.github.com/users/brixxt27/orgs",
                "repos_url": "https://api.github.com/users/brixxt27/repos",
                "events_url": "https://api.github.com/users/brixxt27/events{/privacy}",
                "received_events_url": "https://api.github.com/users/brixxt27/received_events",
                "type": "User",
                "site_admin": false
            },
            "assignees": [
                {
                    "login": "brixxt27",
                    "id": 83959536,
                    "node_id": "MDQ6VXNlcjgzOTU5NTM2",
                    "avatar_url": "https://avatars.githubusercontent.com/u/83959536?v=4",
                    "gravatar_id": "",
                    "url": "https://api.github.com/users/brixxt27",
                    "html_url": "https://github.com/brixxt27",
                    "followers_url": "https://api.github.com/users/brixxt27/followers",
                    "following_url": "https://api.github.com/users/brixxt27/following{/other_user}",
                    "gists_url": "https://api.github.com/users/brixxt27/gists{/gist_id}",
                    "starred_url": "https://api.github.com/users/brixxt27/starred{/owner}{/repo}",
                    "subscriptions_url": "https://api.github.com/users/brixxt27/subscriptions",
                    "organizations_url": "https://api.github.com/users/brixxt27/orgs",
                    "repos_url": "https://api.github.com/users/brixxt27/repos",
                    "events_url": "https://api.github.com/users/brixxt27/events{/privacy}",
                    "received_events_url": "https://api.github.com/users/brixxt27/received_events",
                    "type": "User",
                    "site_admin": false
                }
            ],
            "milestone": null,
            "comments": 1,
            "created_at": "2022-09-10T15:30:29Z",
            "updated_at": "2022-09-10T15:33:19Z",
            "closed_at": null,
            "author_association": "OWNER",
            "active_lock_reason": null,
            "body": "```\r\n#include \"philo.h\"\r\n#include <stdio.h>\r\n\r\nt_bool\tput_up_a_fork(t_philo_info *info)\r\n{\r\n\tif (check_flag_die(info))\r\n\t\treturn (FAIL);\r\n\tpthread_mutex_lock(info->left_fork);\r\n\tpthread_mutex_lock(&info->sharing->m_print);\r\n\tprintf(\"%lu %d %s\\n\", get_now_time(info), info->idx, STR_FORK);\r\n\tpthread_mutex_unlock(&info->sharing->m_print);\r\n\tpthread_mutex_lock(info->right_fork);\r\n\tpthread_mutex_lock(&info->sharing->m_print);\r\n\tprintf(\"%lu %d %s\\n\", get_now_time(info), info->idx, STR_FORK);\r\n\tpthread_mutex_unlock(&info->sharing->m_print);\r\n\treturn (SUCCESS);\r\n}\r\n```\r\n```\r\n#include \"philo.h\"\r\n\r\nt_bool\tput_down_a_fork(t_philo_info *info)\r\n{\r\n\tif (check_flag_die(info))\r\n\t\treturn (FAIL);\r\n\tpthread_mutex_unlock(info->left_fork);\r\n\tpthread_mutex_unlock(info->right_fork);\r\n\treturn (SUCCESS);\r\n}\r\n```",
            "reactions": {
                "url": "https://api.github.com/repos/brixxt27/philosophers/issues/9/reactions",
                "total_count": 0,
                "+1": 0,
                "-1": 0,
                "laugh": 0,
                "hooray": 0,
                "confused": 0,
                "heart": 0,
                "rocket": 0,
                "eyes": 0
            },
            "timeline_url": "https://api.github.com/repos/brixxt27/philosophers/issues/9/timeline",
            "performed_via_github_app": null,
            "state_reason": "reopened"
        }
    },
    "public": true,
    "created_at": "2022-09-10T15:33:20Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment