Commit d7cd2a9b authored by epriestley's avatar epriestley

Begin adding test coverage to GitHub Events API parsers

Summary:
Ref T10538.

This is a tiny fraction of the API. GitHub has 25 primary event types; we currently partially parse 3 of them. GitHub has 17 issue event types; we currently partially parse 12.

Test Plan: Ran `arc unit`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10538

Differential Revision: https://secure.phabricator.com/D15448
parent 638ccf9d
......@@ -61,7 +61,19 @@
"type": "spelling"
},
"text": {
"type": "text"
"type": "text",
"exclude": [
"(^src/(.*/)?__tests__/[^/]+/.*\\.(txt|json))"
]
},
"text-without-length": {
"type": "text",
"include": [
"(^src/(.*/)?__tests__/[^/]+/.*\\.(txt|json))"
],
"severity": {
"3": "disabled"
}
},
"xhpast": {
"type": "xhpast",
......
......@@ -1426,6 +1426,7 @@ phutil_register_library_map(array(
'NuanceGitHubImportCursor' => 'applications/nuance/cursor/NuanceGitHubImportCursor.php',
'NuanceGitHubIssuesImportCursor' => 'applications/nuance/cursor/NuanceGitHubIssuesImportCursor.php',
'NuanceGitHubRawEvent' => 'applications/nuance/github/NuanceGitHubRawEvent.php',
'NuanceGitHubRawEventTestCase' => 'applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php',
'NuanceGitHubRepositoryImportCursor' => 'applications/nuance/cursor/NuanceGitHubRepositoryImportCursor.php',
'NuanceGitHubRepositorySourceDefinition' => 'applications/nuance/source/NuanceGitHubRepositorySourceDefinition.php',
'NuanceImportCursor' => 'applications/nuance/cursor/NuanceImportCursor.php',
......@@ -5687,6 +5688,7 @@ phutil_register_library_map(array(
'NuanceGitHubImportCursor' => 'NuanceImportCursor',
'NuanceGitHubIssuesImportCursor' => 'NuanceGitHubImportCursor',
'NuanceGitHubRawEvent' => 'Phobject',
'NuanceGitHubRawEventTestCase' => 'PhabricatorTestCase',
'NuanceGitHubRepositoryImportCursor' => 'NuanceGitHubImportCursor',
'NuanceGitHubRepositorySourceDefinition' => 'NuanceSourceDefinition',
'NuanceImportCursor' => 'Phobject',
......
......@@ -30,14 +30,35 @@ final class NuanceGitHubRawEvent extends Phobject {
switch ($this->getIssueRawKind()) {
case 'IssuesEvent':
case 'IssuesCommentEvent':
return true;
case 'IssueCommentEvent':
if (!$this->getRawPullRequestData()) {
return true;
}
break;
}
return false;
}
public function isPullRequestEvent() {
if ($this->type == self::TYPE_ISSUE) {
// TODO: This is wrong, some of these are pull events.
return false;
}
$raw = $this->raw;
switch ($this->getIssueRawKind()) {
case 'PullRequestEvent':
return true;
case 'IssueCommentEvent':
if ($this->getRawPullRequestData()) {
return true;
}
break;
}
return false;
}
......@@ -46,27 +67,71 @@ final class NuanceGitHubRawEvent extends Phobject {
return null;
}
return $this->getRawIssueNumber();
}
public function getPullRequestNumber() {
if (!$this->isPullRequestEvent()) {
return null;
}
return $this->getRawIssueNumber();
}
private function getRepositoryFullRawName() {
$raw = $this->raw;
if ($this->type == self::TYPE_ISSUE) {
return idxv($raw, array('issue', 'number'));
$full = idxv($raw, array('repo', 'name'));
if (strlen($full)) {
return $full;
}
if ($this->type == self::TYPE_REPOSITORY) {
return idxv($raw, array('payload', 'issue', 'number'));
// For issue events, the repository is not identified explicitly in the
// response body. Parse it out of the URI.
$matches = null;
$ok = preg_match(
'(/repos/((?:[^/]+)/(?:[^/]+))/issues/events/)',
idx($raw, 'url'),
$matches);
if ($ok) {
return $matches[1];
}
return null;
}
private function getRepositoryFullRawName() {
private function getIssueRawKind() {
$raw = $this->raw;
return idxv($raw, array('repo', 'name'));
return idxv($raw, array('type'));
}
private function getIssueRawKind() {
private function getRawIssueNumber() {
$raw = $this->raw;
return idxv($raw, array('type'));
if ($this->type == self::TYPE_ISSUE) {
return idxv($raw, array('issue', 'number'));
}
if ($this->type == self::TYPE_REPOSITORY) {
$issue_number = idxv($raw, array('payload', 'issue', 'number'));
if ($issue_number) {
return $issue_number;
}
$pull_number = idxv($raw, array('payload', 'number'));
if ($pull_number) {
return $pull_number;
}
}
return null;
}
private function getRawPullRequestData() {
$raw = $this->raw;
return idxv($raw, array('payload', 'issue', 'pull_request'));
}
}
<?php
final class NuanceGitHubRawEventTestCase
extends PhabricatorTestCase {
public function testIssueEvents() {
$path = dirname(__FILE__).'/issueevents/';
$cases = $this->readTestCases($path);
foreach ($cases as $name => $info) {
$input = $info['input'];
$expect = $info['expect'];
$event = NuanceGitHubRawEvent::newEvent(
NuanceGitHubRawEvent::TYPE_ISSUE,
$input);
$this->assertGitHubRawEventParse($expect, $event, $name);
}
}
public function testRepositoryEvents() {
$path = dirname(__FILE__).'/repositoryevents/';
$cases = $this->readTestCases($path);
foreach ($cases as $name => $info) {
$input = $info['input'];
$expect = $info['expect'];
$event = NuanceGitHubRawEvent::newEvent(
NuanceGitHubRawEvent::TYPE_REPOSITORY,
$input);
$this->assertGitHubRawEventParse($expect, $event, $name);
}
}
private function assertGitHubRawEventParse(
array $expect,
NuanceGitHubRawEvent $event,
$name) {
$actual = array(
'repository.name.full' => $event->getRepositoryFullName(),
'is.issue' => $event->isIssueEvent(),
'is.pull' => $event->isPullRequestEvent(),
'issue.number' => $event->getIssueNumber(),
'pull.number' => $event->getPullRequestNumber(),
);
// Only verify the keys which are actually present in the test. This
// allows tests to specify only relevant keys.
$actual = array_select_keys($actual, array_keys($expect));
ksort($expect);
ksort($actual);
$this->assertEqual($expect, $actual, $name);
}
private function readTestCases($path) {
$files = Filesystem::listDirectory($path, $include_hidden = false);
$tests = array();
foreach ($files as $file) {
$data = Filesystem::readFile($path.$file);
$parts = preg_split('/^~{5,}$/m', $data);
if (count($parts) < 2) {
throw new Exception(
pht(
'Expected test file "%s" to contain an input section in JSON, '.
'then an expected result section in JSON, with the two sections '.
'separated by a line of "~~~~~", but the divider is not present '.
'in the file.',
$file));
} else if (count($parts) > 2) {
throw new Exception(
pht(
'Expected test file "%s" to contain exactly two sections, '.
'but it has more than two sections.'));
}
list($input, $expect) = $parts;
try {
$input = phutil_json_decode($input);
$expect = phutil_json_decode($expect);
} catch (Exception $ex) {
throw new PhutilProxyException(
pht(
'Exception while decoding test data for test "%s".',
$file),
$ex);
}
$tests[$file] = array(
'input' => $input,
'expect' => $expect,
);
}
return $tests;
}
}
{
"id": 583217900,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583217900",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "assigned",
"commit_id": null,
"commit_url": null,
"created_at": "2016-03-09T12:42:53Z",
"assignee": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"assigner": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"issue": {
"url": "https://api.github.com/repos/epriestley/poems/issues/1",
"repository_url": "https://api.github.com/repos/epriestley/poems",
"labels_url": "https://api.github.com/repos/epriestley/poems/issues/1/labels{/name}",
"comments_url": "https://api.github.com/repos/epriestley/poems/issues/1/comments",
"events_url": "https://api.github.com/repos/epriestley/poems/issues/1/events",
"html_url": "https://github.com/epriestley/poems/issues/1",
"id": 139138813,
"number": 1,
"title": "Enforce haiku in commit messages edit",
"user": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2016-03-08T00:41:08Z",
"updated_at": "2016-03-09T14:34:46Z",
"closed_at": null,
"body": "OK"
}
}
~~~~~
{
"repository.name.full": "epriestley/poems",
"is.issue": true,
"is.pull": false,
"issue.number": 1
}
{
"id": 583218864,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583218864",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "closed",
"commit_id": null,
"commit_url": null,
"created_at": "2016-03-09T12:43:53Z",
"issue": {
"url": "https://api.github.com/repos/epriestley/poems/issues/1",
"repository_url": "https://api.github.com/repos/epriestley/poems",
"labels_url": "https://api.github.com/repos/epriestley/poems/issues/1/labels{/name}",
"comments_url": "https://api.github.com/repos/epriestley/poems/issues/1/comments",
"events_url": "https://api.github.com/repos/epriestley/poems/issues/1/events",
"html_url": "https://github.com/epriestley/poems/issues/1",
"id": 139138813,
"number": 1,
"title": "Enforce haiku in commit messages edit",
"user": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2016-03-08T00:41:08Z",
"updated_at": "2016-03-09T14:34:46Z",
"closed_at": null,
"body": "OK"
}
}
~~~~~
{
"repository.name.full": "epriestley/poems",
"is.issue": true,
"is.pull": false,
"issue.number": 1
}
{
"id": 583218613,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583218613",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "demilestoned",
"commit_id": null,
"commit_url": null,
"created_at": "2016-03-09T12:43:36Z",
"milestone": {
"title": "b"
},
"issue": {
"url": "https://api.github.com/repos/epriestley/poems/issues/1",
"repository_url": "https://api.github.com/repos/epriestley/poems",
"labels_url": "https://api.github.com/repos/epriestley/poems/issues/1/labels{/name}",
"comments_url": "https://api.github.com/repos/epriestley/poems/issues/1/comments",
"events_url": "https://api.github.com/repos/epriestley/poems/issues/1/events",
"html_url": "https://github.com/epriestley/poems/issues/1",
"id": 139138813,
"number": 1,
"title": "Enforce haiku in commit messages edit",
"user": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2016-03-08T00:41:08Z",
"updated_at": "2016-03-09T14:34:46Z",
"closed_at": null,
"body": "OK"
}
}
~~~~~
{
"repository.name.full": "epriestley/poems",
"is.issue": true,
"is.pull": false,
"issue.number": 1
}
{
"id": 583217784,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583217784",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "labeled",
"commit_id": null,
"commit_url": null,
"created_at": "2016-03-09T12:42:44Z",
"label": {
"name": "bug",
"color": "fc2929"
},
"issue": {
"url": "https://api.github.com/repos/epriestley/poems/issues/1",
"repository_url": "https://api.github.com/repos/epriestley/poems",
"labels_url": "https://api.github.com/repos/epriestley/poems/issues/1/labels{/name}",
"comments_url": "https://api.github.com/repos/epriestley/poems/issues/1/comments",
"events_url": "https://api.github.com/repos/epriestley/poems/issues/1/events",
"html_url": "https://github.com/epriestley/poems/issues/1",
"id": 139138813,
"number": 1,
"title": "Enforce haiku in commit messages edit",
"user": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2016-03-08T00:41:08Z",
"updated_at": "2016-03-09T14:34:46Z",
"closed_at": null,
"body": "OK"
}
}
~~~~~
{
"repository.name.full": "epriestley/poems",
"is.issue": true,
"is.pull": false,
"issue.number": 1
}
{
"id": 583218006,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583218006",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "locked",
"commit_id": null,
"commit_url": null,
"created_at": "2016-03-09T12:42:58Z",
"issue": {
"url": "https://api.github.com/repos/epriestley/poems/issues/1",
"repository_url": "https://api.github.com/repos/epriestley/poems",
"labels_url": "https://api.github.com/repos/epriestley/poems/issues/1/labels{/name}",
"comments_url": "https://api.github.com/repos/epriestley/poems/issues/1/comments",
"events_url": "https://api.github.com/repos/epriestley/poems/issues/1/events",
"html_url": "https://github.com/epriestley/poems/issues/1",
"id": 139138813,
"number": 1,
"title": "Enforce haiku in commit messages edit",
"user": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 5,
"created_at": "2016-03-08T00:41:08Z",
"updated_at": "2016-03-09T14:34:46Z",
"closed_at": null,
"body": "OK"
}
}
~~~~~
{
"repository.name.full": "epriestley/poems",
"is.issue": true,
"is.pull": false,
"issue.number": 1
}
{
"id": 583217866,
"url": "https://api.github.com/repos/epriestley/poems/issues/events/583217866",
"actor": {
"login": "epriestley",
"id": 102631,
"avatar_url": "https://avatars.githubusercontent.com/u/102631?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/epriestley",
"html_url": "https://github.com/epriestley",
"followers_url": "https://api.github.com/users/epriestley/followers",
"following_url": "https://api.github.com/users/epriestley/following{/other_user}",
"gists_url": "https://api.github.com/users/epriestley/gists{/gist_id}",
"starred_url": "https://api.github.com/users/epriestley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epriestley/subscriptions",
"organizations_url": "https://api.github.com/users/epriestley/orgs",
"repos_url": "https://api.github.com/users/epriestley/repos",
"events_url": "https://api.github.com/users/epriestley/events{/privacy}",
"received_events_url": "https://api.github.com/users/epriestley/received_events",
"type": "User",
"site_admin": false
},
"event": "milestoned",