Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767920
D747.id1913.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
34 KB
Referenced Files
None
Subscribers
None
D747.id1913.diff
View Options
diff --git a/app/Analyzers/GitHub/Events/PullRequestEvent.php b/app/Analyzers/GitHub/Events/PullRequestEvent.php
new file mode 100644
--- /dev/null
+++ b/app/Analyzers/GitHub/Events/PullRequestEvent.php
@@ -0,0 +1,91 @@
+<?php
+
+namespace Nasqueron\Notifications\Analyzers\GitHub\Events;
+
+/**
+ * PingEvent payload analyzer
+ *
+ * @link https://developer.github.com/v3/activity/events/types/#pullrequestevent
+ */
+class PullRequestEvent extends Event {
+
+ /**
+ * Determines if the action is valid.
+ *
+ * @param string $type The action to check
+ * @return bool true if the action is valid; otherwise, false
+ */
+ protected static function isValidAction ($action) {
+ $actions = [
+ 'assigned', 'unassigned',
+ 'labeled', 'unlabeled',
+ 'opened', 'closed',
+ 'edited', 'reopened',
+ ];
+ return in_array($action, $actions);
+ }
+
+ /**
+ * Gets description for the payload.
+ *
+ * @return string
+ */
+ public function getDescription () {
+ $action = $this->payload->action;
+
+ if (!static::isValidAction($action)) {
+ return trans(
+ 'GitHub.EventsDescriptions.PullRequestEventUnknown',
+ ['action' => $action]
+ );
+ }
+
+ $key = 'GitHub.EventsDescriptions.PullRequestEventPerAction.';
+ $key .= $action;
+
+ return trans($key, $this->getLocalisationParameters());
+ }
+
+ /**
+ * Gets the parameters to pass to the localisation message
+ *
+ * @return array
+ */
+ private function getLocalisationParameters () {
+ $parameters = [
+ 'author' => $this->payload->sender->login,
+ 'number' => $this->payload->number,
+ 'title' => $this->payload->pull_request->title,
+ ];
+ switch ($this->payload->action) {
+ case 'assigned':
+ $parameters['assignee'] = $this->getLastAssignee();
+ break;
+ }
+ return $parameters;
+ }
+
+ /**
+ * @return string The last assignee username, or "" if there is no assignee.
+ */
+ private function getLastAssignee() {
+ $assignees = $this->payload->pull_request->assignees;
+
+ if (count($assignees) === 0) {
+ return ""; // No assignee.
+ }
+
+ $assignee = array_pop($assignees);
+ return $assignee->login;
+ }
+
+ /**
+ * Gets link for the payload.
+ *
+ * @return string
+ */
+ public function getLink () {
+ return $this->payload->pull_request->html_url;
+ }
+
+}
diff --git a/resources/lang/en/GitHub.php b/resources/lang/en/GitHub.php
--- a/resources/lang/en/GitHub.php
+++ b/resources/lang/en/GitHub.php
@@ -41,6 +41,18 @@
'PingEvent' => '« :zen » — GitHub Webhooks ping zen aphorism.',
+ 'PullRequestEventPerAction' => [
+ 'assigned' => ':author has assigned the pull request #:number — :title to :assignee',
+ 'unassigned' => ':author has edited the assignees from the pull request #:number — :title',
+ 'labeled' => ':author has labeled the pull request #:number — :title',
+ 'unlabeled' => ':author has removed a label from the pull request #:number — :title',
+ 'opened' => ':author has opened a pull request: #:number — :title',
+ 'edited' => ':author has edited the pull request #:number — :title',
+ 'closed' => ':author has closed the pull request #:number — :title',
+ 'reopened' => ':author has reopened the pull request #:number — :title',
+ ],
+ 'PullRequestEventUnknown' => 'Unknown pull request action: :action',
+
'PushEvent' => [
'0' => ':user forcely updated :repoAndBranch',
'n' => ':user pushed :count commits to :repoAndBranch', // n > 1
diff --git a/tests/Analyzers/GitHub/Events/EventTest.php b/tests/Analyzers/GitHub/Events/EventTest.php
--- a/tests/Analyzers/GitHub/Events/EventTest.php
+++ b/tests/Analyzers/GitHub/Events/EventTest.php
@@ -77,6 +77,11 @@
'baxterthehacker/public-repo has been forked to baxterandthehackers/public-repo',
'https://github.com/baxterandthehackers/public-repo'
],
+ 'PullRequestEvent' => [
+ 'pull_request',
+ 'baxterthehacker has opened a pull request: #1 — Update the README with new information',
+ 'https://github.com/baxterthehacker/public-repo/pull/1'
+ ],
'PushEvent' => [
'push',
'baxterthehacker committed Update README.md',
diff --git a/tests/Analyzers/GitHub/Events/PullRequestEventTest.php b/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
new file mode 100644
--- /dev/null
+++ b/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace Nasqueron\Notifications\Tests\Analyzers\GitHub\Events;
+
+use Nasqueron\Notifications\Analyzers\GitHub\Events\PullRequestEvent;
+use Nasqueron\Notifications\Tests\TestCase;
+
+class PullRequestEventTest extends TestCase {
+
+ /**
+ * @var stdClass
+ */
+ private $payload;
+
+ public function setUp () {
+ $filename = __DIR__ . "/../../../data/payloads/GitHubEvents/pull_request.json";
+ $this->payload = json_decode(file_get_contents($filename));
+
+ parent::setUp();
+ }
+
+ /**
+ * @dataProvider payloadDescriptionProvider
+ */
+ public function testWhenRepositoryPerAction ($action, $description) {
+ $this->payload->action = $action;
+ $event = new PullRequestEvent($this->payload);
+ $this->assertSame($description, $event->getDescription());
+ }
+
+ /**
+ * Provides actions and descritions for testWhenRepositoryPerAction
+ *
+ * See https://developer.github.com/v3/activity/events/types/#pullrequestevent
+ */
+ public function payloadDescriptionProvider () {
+ return [
+ ['assigned', "baxterthehacker has assigned the pull request #1 — Update the README with new information to alken-orin"],
+ ['unassigned', "baxterthehacker has edited the assignees from the pull request #1 — Update the README with new information"],
+ ['labeled', "baxterthehacker has labeled the pull request #1 — Update the README with new information"],
+ ['unlabeled', "baxterthehacker has removed a label from the pull request #1 — Update the README with new information"],
+ ['opened', "baxterthehacker has opened a pull request: #1 — Update the README with new information"],
+ ['edited', "baxterthehacker has edited the pull request #1 — Update the README with new information"],
+ ['closed', "baxterthehacker has closed the pull request #1 — Update the README with new information"],
+ ['reopened', "baxterthehacker has reopened the pull request #1 — Update the README with new information"],
+ ['quuxed', "Unknown pull request action: quuxed"],
+ ];
+ }
+
+}
diff --git a/tests/data/payloads/GitHubEvents/pull_request.json b/tests/data/payloads/GitHubEvents/pull_request.json
new file mode 100644
--- /dev/null
+++ b/tests/data/payloads/GitHubEvents/pull_request.json
@@ -0,0 +1,470 @@
+{
+ "action": "opened",
+ "number": 1,
+ "pull_request": {
+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
+ "id": 34778301,
+ "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
+ "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
+ "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
+ "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
+ "number": 1,
+ "state": "open",
+ "locked": false,
+ "title": "Update the README with new information",
+ "user": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "body": "This is a pretty simple change that we need to pull into master.",
+ "created_at": "2015-05-05T23:40:27Z",
+ "updated_at": "2015-05-05T23:40:27Z",
+ "closed_at": null,
+ "merged_at": null,
+ "merge_commit_sha": null,
+ "assignee": {
+ "login": "dereckson",
+ "id": 135563,
+ "avatar_url": "https://avatars.githubusercontent.com/u/135563?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/dereckson",
+ "html_url": "https://github.com/dereckson",
+ "followers_url": "https://api.github.com/users/dereckson/followers",
+ "following_url": "https://api.github.com/users/dereckson/following{/other_user}",
+ "gists_url": "https://api.github.com/users/dereckson/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/dereckson/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/dereckson/subscriptions",
+ "organizations_url": "https://api.github.com/users/dereckson/orgs",
+ "repos_url": "https://api.github.com/users/dereckson/repos",
+ "events_url": "https://api.github.com/users/dereckson/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/dereckson/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "assignees": [
+ {
+ "login": "dereckson",
+ "id": 135563,
+ "avatar_url": "https://avatars.githubusercontent.com/u/135563?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/dereckson",
+ "html_url": "https://github.com/dereckson",
+ "followers_url": "https://api.github.com/users/dereckson/followers",
+ "following_url": "https://api.github.com/users/dereckson/following{/other_user}",
+ "gists_url": "https://api.github.com/users/dereckson/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/dereckson/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/dereckson/subscriptions",
+ "organizations_url": "https://api.github.com/users/dereckson/orgs",
+ "repos_url": "https://api.github.com/users/dereckson/repos",
+ "events_url": "https://api.github.com/users/dereckson/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/dereckson/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ {
+ "login": "alken-orin",
+ "id": 15827331,
+ "avatar_url": "https://avatars.githubusercontent.com/u/15827331?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/alken-orin",
+ "html_url": "https://github.com/alken-orin",
+ "followers_url": "https://api.github.com/users/alken-orin/followers",
+ "following_url": "https://api.github.com/users/alken-orin/following{/other_user}",
+ "gists_url": "https://api.github.com/users/alken-orin/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/alken-orin/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/alken-orin/subscriptions",
+ "organizations_url": "https://api.github.com/users/alken-orin/orgs",
+ "repos_url": "https://api.github.com/users/alken-orin/repos",
+ "events_url": "https://api.github.com/users/alken-orin/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/alken-orin/received_events",
+ "type": "User",
+ "site_admin": false
+ }
+ ],
+ "milestone": null,
+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
+ "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
+ "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
+ "head": {
+ "label": "baxterthehacker:changes",
+ "ref": "changes",
+ "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
+ "user": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 35129377,
+ "name": "public-repo",
+ "full_name": "baxterthehacker/public-repo",
+ "owner": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/baxterthehacker/public-repo",
+ "description": "",
+ "fork": false,
+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",
+ "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
+ "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
+ "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
+ "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
+ "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
+ "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
+ "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
+ "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
+ "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
+ "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
+ "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
+ "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
+ "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
+ "created_at": "2015-05-05T23:40:12Z",
+ "updated_at": "2015-05-05T23:40:12Z",
+ "pushed_at": "2015-05-05T23:40:26Z",
+ "git_url": "git://github.com/baxterthehacker/public-repo.git",
+ "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
+ "clone_url": "https://github.com/baxterthehacker/public-repo.git",
+ "svn_url": "https://github.com/baxterthehacker/public-repo",
+ "homepage": null,
+ "size": 0,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": true,
+ "forks_count": 0,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 0,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master"
+ }
+ },
+ "base": {
+ "label": "baxterthehacker:master",
+ "ref": "master",
+ "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
+ "user": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 35129377,
+ "name": "public-repo",
+ "full_name": "baxterthehacker/public-repo",
+ "owner": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/baxterthehacker/public-repo",
+ "description": "",
+ "fork": false,
+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",
+ "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
+ "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
+ "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
+ "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
+ "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
+ "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
+ "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
+ "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
+ "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
+ "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
+ "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
+ "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
+ "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
+ "created_at": "2015-05-05T23:40:12Z",
+ "updated_at": "2015-05-05T23:40:12Z",
+ "pushed_at": "2015-05-05T23:40:26Z",
+ "git_url": "git://github.com/baxterthehacker/public-repo.git",
+ "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
+ "clone_url": "https://github.com/baxterthehacker/public-repo.git",
+ "svn_url": "https://github.com/baxterthehacker/public-repo",
+ "homepage": null,
+ "size": 0,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": true,
+ "forks_count": 0,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 0,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master"
+ }
+ },
+ "_links": {
+ "self": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
+ },
+ "html": {
+ "href": "https://github.com/baxterthehacker/public-repo/pull/1"
+ },
+ "issue": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
+ },
+ "comments": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
+ },
+ "review_comments": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
+ },
+ "review_comment": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
+ },
+ "commits": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
+ },
+ "statuses": {
+ "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
+ }
+ },
+ "merged": false,
+ "mergeable": null,
+ "mergeable_state": "unknown",
+ "merged_by": null,
+ "comments": 0,
+ "review_comments": 0,
+ "commits": 1,
+ "additions": 1,
+ "deletions": 1,
+ "changed_files": 1
+ },
+ "repository": {
+ "id": 35129377,
+ "name": "public-repo",
+ "full_name": "baxterthehacker/public-repo",
+ "owner": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "private": false,
+ "html_url": "https://github.com/baxterthehacker/public-repo",
+ "description": "",
+ "fork": false,
+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",
+ "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
+ "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
+ "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
+ "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
+ "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
+ "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
+ "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
+ "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
+ "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
+ "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
+ "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
+ "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
+ "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
+ "created_at": "2015-05-05T23:40:12Z",
+ "updated_at": "2015-05-05T23:40:12Z",
+ "pushed_at": "2015-05-05T23:40:26Z",
+ "git_url": "git://github.com/baxterthehacker/public-repo.git",
+ "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
+ "clone_url": "https://github.com/baxterthehacker/public-repo.git",
+ "svn_url": "https://github.com/baxterthehacker/public-repo",
+ "homepage": null,
+ "size": 0,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": true,
+ "forks_count": 0,
+ "mirror_url": null,
+ "open_issues_count": 1,
+ "forks": 0,
+ "open_issues": 1,
+ "watchers": 0,
+ "default_branch": "master"
+ },
+ "sender": {
+ "login": "baxterthehacker",
+ "id": 6752317,
+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/baxterthehacker",
+ "html_url": "https://github.com/baxterthehacker",
+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+ "type": "User",
+ "site_admin": false
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 04:15 (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259112
Default Alt Text
D747.id1913.diff (34 KB)
Attached To
Mode
D747: Support GitHub pull request event
Attached
Detach File
Event Timeline
Log In to Comment