Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3766306
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
40 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/app/Analyzers/GitHub/Events/PullRequestEvent.php b/app/Analyzers/GitHub/Events/PullRequestEvent.php
new file mode 100644
index 0000000..9e33c7f
--- /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
index 2d1b57b..76bcd17 100644
--- a/resources/lang/en/GitHub.php
+++ b/resources/lang/en/GitHub.php
@@ -1,70 +1,82 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| GitHub notifications messages
|--------------------------------------------------------------------------
|
| The following language lines are used to localize notifications for events
| fired by GitHub
|
*/
'Separator' => ' — ',
'Commits' => [
'Message' => ':committer committed :title',
'Authored' => ' (authored by :author)', // appended to Message
],
'RepoAndBranch' => ':repo (branch :branch)',
'EventsDescriptions' => [
'CommitCommentEvent' => ':author added a comment to :commit: :excerpt',
'CreateEvent' => 'New :type on :repository: :ref',
'CreateEventUnknown' => 'Unknown create reference: :type :ref',
'DeleteEvent' => 'Removed :type on :repository: :ref',
'DeleteEventUnknown' => 'Unknown delete reference: :type :ref',
'ForkEvent' => ':repo_base has been forked to :repo_fork',
'IssueCommentEventPerAction' => [
'created' => ":author added a comment to issue #:issueNumber — :issueTitle: :excerpt",
'edited' => ":author edited a comment to issue #:issueNumber — :issueTitle: :excerpt",
'deleted' => ":author deleted a comment to issue #:issueNumber — :issueTitle",
],
'IssueCommentEventUnknown' => 'Unknown issue comment action: :action',
'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
],
'RepositoryEventPerAction' => [
'created' => 'New repository :repository',
'deleted' => "Repository :repository deleted (danger zone)",
'publicized' => "Repository :repository is now public",
'privatized' => "Repository :repository is now private",
],
'RepositoryEventFork' => ' (fork)',
'RepositoryEventUnknown' => 'Unknown repository action: :action',
'StatusEvent' => 'Status of :commit: :status',
'WatchEvent' => ':user starred :repository',
],
'StatusEventState' => [
'pending' => 'pending',
'success' => 'success',
'failure' => 'failure',
'error' => 'error',
],
];
diff --git a/tests/Analyzers/GitHub/Events/EventTest.php b/tests/Analyzers/GitHub/Events/EventTest.php
index b8bda76..45e7366 100644
--- a/tests/Analyzers/GitHub/Events/EventTest.php
+++ b/tests/Analyzers/GitHub/Events/EventTest.php
@@ -1,103 +1,108 @@
<?php
namespace Nasqueron\Notifications\Tests\Analyzers\GitHub\Events;
use Nasqueron\Notifications\Analyzers\GitHub\Events\Event;
use Nasqueron\Notifications\Tests\TestCase;
class EventTest extends TestCase {
public function testGetClass () {
$this->assertSame(
'Nasqueron\Notifications\Analyzers\GitHub\Events\CommitCommentEvent',
Event::getClass('commit_comment')
);
}
public function testForPayload () {
$this->assertInstanceOf(
'Nasqueron\Notifications\Analyzers\GitHub\Events\CommitCommentEvent',
Event::forPayload('commit_comment', new \stdClass)
);
}
/**
* @expectedException InvalidArgumentException
*/
public function testForPayloadWithException () {
Event::forPayload('not_existing', new \stdClass);
}
public function testCut () {
$this->assertSame('', Event::cut(''));
$this->assertSame('', Event::cut('', 0));
$this->assertSame('…', Event::cut('Lorem ipsum dolor', 0));
$this->assertSame('Lorem…', Event::cut('Lorem ipsum dolor', 6));
$this->assertSame('Lorem ipsum dolor', Event::cut('Lorem ipsum dolor'));
}
/**
* @dataProvider payloadDescriptionProvider
*/
public function testGetDescriptionAndLink ($eventName,
$expectedDescription,
$expectedLink) {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/$eventName.json";
$payload = json_decode(file_get_contents($filename));
$event = Event::forPayload($eventName, $payload);
$this->assertSame($expectedDescription, $event->getDescription());
$this->assertSame($expectedLink, $event->getLink());
}
public function payloadDescriptionProvider () {
return [
'CommitCommentEvent' => [
'commit_comment',
'baxterthehacker added a comment to 9049f126: This is a really good change! :+1:',
'https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b#commitcomment-11056394'
],
'CreateEvent' => [
'create',
'New tag on baxterthehacker/public-repo: 0.0.1',
'https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1'
],
'DeleteEvent' => [
'delete',
'Removed tag on baxterthehacker/public-repo: simple-tag',
'https://github.com/baxterthehacker/public-repo/tags'
],
'IssueCommentEvent' => [
'issue_comment',
"baxterthehacker added a comment to issue #2 — Spelling error in the README file: You are totally right! I'll get this fixed right away.",
'https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140'
],
'ForkEvent' => [
'fork',
'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',
'https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c'
],
'RepositoryEvent' => [
'repository',
'New repository baxterandthehackers/new-repository',
'https://github.com/baxterandthehackers/new-repository'
],
'StatusEvent' => [
'status',
'Status of 9049f126: default — success',
''
],
'WatchEvent' => [
'watch',
'baxterthehacker starred baxterthehacker/public-repo',
'https://github.com/baxterthehacker'
],
];
}
}
diff --git a/tests/Analyzers/GitHub/Events/PullRequestEventTest.php b/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
new file mode 100644
index 0000000..2f02238
--- /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
index 0000000..a6da55b
--- /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/x-diff
Expires
Sun, Nov 24, 17:35 (45 m, 5 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258551
Default Alt Text
(40 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment