Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15289360
D15540.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
12 KB
Referenced Files
None
Subscribers
None
D15540.diff
View Options
diff --git a/src/applications/nuance/github/NuanceGitHubRawEvent.php b/src/applications/nuance/github/NuanceGitHubRawEvent.php
--- a/src/applications/nuance/github/NuanceGitHubRawEvent.php
+++ b/src/applications/nuance/github/NuanceGitHubRawEvent.php
@@ -236,6 +236,11 @@
$title);
}
+ public function getActorGitHubUserID() {
+ $raw = $this->raw;
+ return (int)idxv($raw, array('actor', 'id'));
+ }
+
private function getTargetObjectName() {
if ($this->isPullRequestEvent()) {
$number = $this->getRawIssueNumber();
diff --git a/src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php b/src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php
--- a/src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php
+++ b/src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php
@@ -52,6 +52,7 @@
'uri' => $event->getURI(),
'title.full' => $event->getEventFullTitle(),
'comment' => $event->getComment(),
+ 'actor.id' => $event->getActorGitHubUserID(),
);
// Only verify the keys which are actually present in the test. This
diff --git a/src/applications/nuance/github/__tests__/issueevents/assigned.txt b/src/applications/nuance/github/__tests__/issueevents/assigned.txt
--- a/src/applications/nuance/github/__tests__/issueevents/assigned.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/assigned.txt
@@ -113,5 +113,6 @@
"issue.number": 1,
"id": 583217900,
"uri": "https://github.com/epriestley/poems/issues/1#event-583217900",
- "title.full": "GitHub epriestley/poems Issue #1 (Assigned: epriestley)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Assigned: epriestley)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/closed.txt b/src/applications/nuance/github/__tests__/issueevents/closed.txt
--- a/src/applications/nuance/github/__tests__/issueevents/closed.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/closed.txt
@@ -75,5 +75,6 @@
"issue.number": 1,
"id": 583218864,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218864",
- "title.full": "GitHub epriestley/poems Issue #1 (Closed)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Closed)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/demilestoned.txt b/src/applications/nuance/github/__tests__/issueevents/demilestoned.txt
--- a/src/applications/nuance/github/__tests__/issueevents/demilestoned.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/demilestoned.txt
@@ -78,5 +78,6 @@
"issue.number": 1,
"id": 583218613,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218613",
- "title.full": "GitHub epriestley/poems Issue #1 (Removed Milestone: b)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Removed Milestone: b)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/labeled.txt b/src/applications/nuance/github/__tests__/issueevents/labeled.txt
--- a/src/applications/nuance/github/__tests__/issueevents/labeled.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/labeled.txt
@@ -79,5 +79,6 @@
"issue.number": 1,
"id": 583217784,
"uri": "https://github.com/epriestley/poems/issues/1#event-583217784",
- "title.full": "GitHub epriestley/poems Issue #1 (Added Label: bug)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Added Label: bug)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/milestoned.txt b/src/applications/nuance/github/__tests__/issueevents/milestoned.txt
--- a/src/applications/nuance/github/__tests__/issueevents/milestoned.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/milestoned.txt
@@ -78,5 +78,6 @@
"issue.number": 1,
"id": 583217866,
"uri": "https://github.com/epriestley/poems/issues/1#event-583217866",
- "title.full": "GitHub epriestley/poems Issue #1 (Added Milestone: b)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Added Milestone: b)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/renamed.txt b/src/applications/nuance/github/__tests__/issueevents/renamed.txt
--- a/src/applications/nuance/github/__tests__/issueevents/renamed.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/renamed.txt
@@ -79,5 +79,6 @@
"issue.number": 1,
"id": 583218162,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218162",
- "title.full": "GitHub epriestley/poems Issue #1 (Renamed)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Renamed)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/reopened.txt b/src/applications/nuance/github/__tests__/issueevents/reopened.txt
--- a/src/applications/nuance/github/__tests__/issueevents/reopened.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/reopened.txt
@@ -75,5 +75,6 @@
"issue.number": 1,
"id": 583218814,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218814",
- "title.full": "GitHub epriestley/poems Issue #1 (Reopened)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Reopened)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/unassigned.txt b/src/applications/nuance/github/__tests__/issueevents/unassigned.txt
--- a/src/applications/nuance/github/__tests__/issueevents/unassigned.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/unassigned.txt
@@ -113,5 +113,6 @@
"issue.number": 1,
"id": 583218511,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218511",
- "title.full": "GitHub epriestley/poems Issue #1 (Unassigned: epriestley)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Unassigned: epriestley)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/unlabeled.txt b/src/applications/nuance/github/__tests__/issueevents/unlabeled.txt
--- a/src/applications/nuance/github/__tests__/issueevents/unlabeled.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/unlabeled.txt
@@ -79,5 +79,6 @@
"issue.number": 1,
"id": 583218703,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218703",
- "title.full": "GitHub epriestley/poems Issue #1 (Removed Label: bug)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Removed Label: bug)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/issueevents/unlocked.txt b/src/applications/nuance/github/__tests__/issueevents/unlocked.txt
--- a/src/applications/nuance/github/__tests__/issueevents/unlocked.txt
+++ b/src/applications/nuance/github/__tests__/issueevents/unlocked.txt
@@ -75,5 +75,6 @@
"issue.number": 1,
"id": 583218062,
"uri": "https://github.com/epriestley/poems/issues/1#event-583218062",
- "title.full": "GitHub epriestley/poems Issue #1 (Unlocked)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Unlocked)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/CreateEvent.tag.txt b/src/applications/nuance/github/__tests__/repositoryevents/CreateEvent.tag.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/CreateEvent.tag.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/CreateEvent.tag.txt
@@ -33,5 +33,6 @@
"pull.number": null,
"id": 3784548642,
"uri": "https://github.com/epriestley/poems/commits/phabricator/diff/400",
- "title.full": "GitHub epriestley/poems Tag phabricator/diff/400 (Created)"
+ "title.full": "GitHub epriestley/poems Tag phabricator/diff/400 (Created)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.pull.txt b/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.pull.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.pull.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.pull.txt
@@ -161,5 +161,6 @@
"id": 3740938746,
"uri": "https://github.com/epriestley/poems/pull/2#issuecomment-194282800",
"title.full": "GitHub epriestley/poems Pull Request #2 (Comment)",
- "comment": "wub wub"
+ "comment": "wub wub",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.txt b/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/IssueCommentEvent.created.txt
@@ -98,5 +98,6 @@
"id": 3733510485,
"uri": "https://github.com/epriestley/poems/issues/1#issuecomment-193528669",
"title.full": "GitHub epriestley/poems Issue #1 (Comment)",
- "comment": "comment on issue"
+ "comment": "comment on issue",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.closed.txt b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.closed.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.closed.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.closed.txt
@@ -69,5 +69,6 @@
"issue.number": 1,
"id": 3740905151,
"uri": "https://github.com/epriestley/poems/issues/1#event-3740905151",
- "title.full": "GitHub epriestley/poems Issue #1 (Closed)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Closed)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.opened.txt b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.opened.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.opened.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.opened.txt
@@ -69,5 +69,6 @@
"issue.number": 1,
"id": 3733509737,
"uri": "https://github.com/epriestley/poems/issues/1#event-3733509737",
- "title.full": "GitHub epriestley/poems Issue #1 (Created)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Created)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.reopened.txt b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.reopened.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.reopened.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/IssuesEvent.reopened.txt
@@ -69,5 +69,6 @@
"issue.number": 1,
"id": 3740908680,
"uri": "https://github.com/epriestley/poems/issues/1#event-3740908680",
- "title.full": "GitHub epriestley/poems Issue #1 (Reopened)"
+ "title.full": "GitHub epriestley/poems Issue #1 (Reopened)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/PullRequestEvent.opened.txt b/src/applications/nuance/github/__tests__/repositoryevents/PullRequestEvent.opened.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/PullRequestEvent.opened.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/PullRequestEvent.opened.txt
@@ -333,5 +333,6 @@
"pull.number": 2,
"id": 3740936638,
"uri": "https://github.com/epriestley/poems/pull/2#event-3740936638",
- "title.full": "GitHub epriestley/poems Pull Request #2 (Created)"
+ "title.full": "GitHub epriestley/poems Pull Request #2 (Created)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/PushEvent.txt b/src/applications/nuance/github/__tests__/repositoryevents/PushEvent.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/PushEvent.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/PushEvent.txt
@@ -44,5 +44,6 @@
"issue.number": null,
"id": 3498724127,
"uri": "https://github.com/epriestley/poems/commits/c829132d37c4c1da80d319942a5a1e500632b52f",
- "title.full": "GitHub epriestley/poems Branch master (Pushed: c829132d37c4)"
+ "title.full": "GitHub epriestley/poems Branch master (Pushed: c829132d37c4)",
+ "actor.id": 102631
}
diff --git a/src/applications/nuance/github/__tests__/repositoryevents/WatchEvent.started.txt b/src/applications/nuance/github/__tests__/repositoryevents/WatchEvent.started.txt
--- a/src/applications/nuance/github/__tests__/repositoryevents/WatchEvent.started.txt
+++ b/src/applications/nuance/github/__tests__/repositoryevents/WatchEvent.started.txt
@@ -28,5 +28,6 @@
"pull.number": null,
"id": 3740950917,
"uri": null,
- "title.full": "GitHub epriestley/poems User epriestley (Watched)"
+ "title.full": "GitHub epriestley/poems User epriestley (Watched)",
+ "actor.id": 102631
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 5, 9:45 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227493
Default Alt Text
D15540.diff (12 KB)
Attached To
Mode
D15540: Extract GitHub actor IDs from GitHub events
Attached
Detach File
Event Timeline
Log In to Comment