GitHub PullRequestReviewCommentEvent at 2014-10-03 07:05:39
Repository: simplenews
Actor: Berdir
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/iwanfux/simplenews/pulls/comments/18383584","id":18383584,"diff_hunk":"@@ -0,0 +1,307 @@\n+<?php\n+/**\n+ * @file\n+ * Contains \\Drupal\\simplenews\\Form\\SubscriberFormBase.\n+ */\n+\n+namespace Drupal\\simplenews\\Form;\n+\n+use Drupal\\Core\\Entity\\ContentEntityForm;\n+use Drupal\\Core\\Entity\\EntityInterface;\n+use Drupal\\Core\\Entity\\EntityManagerInterface;\n+use Drupal\\Core\\Form\\FormStateInterface;\n+use Drupal\\simplenews\\Entity\\Newsletter;\n+\n+/**\n+ * Entity form for Subscriber with common routines.\n+ */\n+abstract class SubscriberFormBase extends ContentEntityForm {\n+\n+  /**\n+   * Submit button ID for creating new subscriptions.\n+   *\n+   * @var string\n+   */\n+  const SUBMIT_SUBSCRIBE = 'subscribe';\n+\n+  /**\n+   * Submit button ID for removing existing subscriptions.\n+   *\n+   * @var string\n+   */\n+  const SUBMIT_UNSUBSCRIBE = 'unsubscribe';\n+\n+  /**\n+   * Submit button ID for creating and removing subscriptions.\n+   *\n+   * @var string\n+   */\n+  const SUBMIT_UPDATE = 'update';\n+\n+  /**\n+   * The newsletters available to select from.\n+   *\n+   * @var string[]\n+   */\n+  protected $newsletters = array();\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public function __construct(EntityManagerInterface $entity_manager) {\n+    $this->setNewsletters(array_keys(Newsletter::loadMultiple()));\n+    parent::__construct($entity_manager);\n+  }\n+\n+  /**\n+   * Set the newsletters available to select from.\n+   *\n+   * Unless called otherwise, all newsletters will be available.\n+   *\n+   * @param string[] $newsletters\n+   *   An array of Newsletter IDs.\n+   */\n+  public function setNewsletters(array $newsletters) {\n+    $this->newsletters = $newsletters;\n+  }\n+\n+  /**\n+   * Returns the newsletters available to select from.\n+   *\n+   * @return string[]\n+   *   The newsletter IDs available to select from, as an associative array with\n+   *   values equNewsletter IDs for keys and values.\n+   */\n+  public function getNewsletters() {\n+    return $this->newsletters;\n+  }\n+\n+  /**\n+   * Convenience method for the case of only one available newsletter.\n+   *\n+   * @see ::setNewsletter()\n+   *\n+   * @return string|null\n+   *   If there is exactly one newsletter available in this form, this method\n+   *   returns its ID. Otherwise it returns NULL.\n+   */\n+  protected function getOnlyNewsletter() {\n+    $newsletters = $this->getNewsletters();\n+    if (count($newsletters) == 1) {\n+      return array_shift($newsletters);\n+    }\n+    return NULL;\n+  }\n+\n+  /**\n+   * Returns a message to display to the user upon successful form submission.\n+   *\n+   * @param \\Drupal\\Core\\Form\\FormStateInterface $form_state\n+   *   Form state object.\n+   * @param string $op\n+   *   A string equal to either ::SUBMIT_UPDATE, ::SUBMIT_SUBSCRIBE or\n+   *   ::SUBMIT_UNSUBSCRIBE.\n+   * @param bool $confirm\n+   *   Whether a confirmation mail is sent or not.\n+   *\n+   * @return string\n+   *   A HTML message.\n+   */\n+  abstract protected function getSubmitMessage(FormStateInterface $form_state, $op, $confirm);\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public function form(array $form, FormStateInterface $form_state) {\n+    $form = parent::form($form, $form_state);\n+\n+    // Filter newsletter options as indicated with ::setNewsletters().\n+    $form['subscriptions']['widget']['#options']\n+      = array_intersect_key($form['subscriptions']['widget']['#options'], array_flip($this->getNewsletters()));\n+\n+    // Modify UI texts.\n+    if ($mail = $this->entity->getMail()) {\n+      $form['mail']['#access'] = FALSE;\n+      $form['subscriptions']['widget']['#title'] = t('Subscriptions for %mail', array('%mail' => $mail));\n+      $form['subscriptions']['widget']['#description'] = t('Check the newsletters you want to subscribe to. Uncheck the ones you want to unsubscribe from.');\n+    }\n+    else {\n+      $form['subscriptions']['widget']['#title'] = t('Manage your newsletter subscriptions');\n+      $form['subscriptions']['widget']['#description'] = t('Select the newsletter(s) to which you want to subscribe or unsubscribe.');\n+    }\n+\n+    return $form;\n+  }\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  protected function actions(array $form, FormStateInterface $form_state) {\n+    // Set up some flags from which submit button visibility can be determined.\n+    $options = $form['subscriptions']['#access'];\n+    $mail = (bool) $this->entity->getMail();\n+    $subscribed = !$options && $mail && $this->entity->isSubscribed($this->getOnlyNewsletter());\n+\n+    // Add all buttons, but conditionally set #access.\n+    $actions = array(\n+      static::SUBMIT_SUBSCRIBE => array(\n+        // Show 'Subscribe' if not subscribed, or user is unknown.\n+        '#access' => (!$options && !$subscribed) || !$mail,\n+        '#type' => 'submit',\n+        '#value' => t('Subscribe'),\n+        '#validate' => array('::validate'),\n+        '#submit' => array('::submitForm', '::save', '::submitSubscribe'),\n+      ),\n+      static::SUBMIT_UNSUBSCRIBE => array(\n+        // Show 'Unsubscribe' if subscribed, or unknown and can select.\n+        '#access' => (!$options && $subscribed) || (!$mail && $options),\n+        '#type' => 'submit',\n+        '#value' => t('Unsubscribe'),\n+        '#validate' => array('::validate'),\n+        '#submit' => array('::submitForm', '::save', '::submitUnsubscribe'),\n+      ),\n+      static::SUBMIT_UPDATE => array(\n+        // Show 'Update' if user is known and can select newsletters.\n+        // @todo Incorrect conditions.\n+        '#access' => $options && $mail,\n+        '#type' => 'submit',\n+        '#value' => t('Update'),\n+        '#validate' => array('::validate'),\n+        '#submit' => array('::submitForm', '::save', '::submitUpdate'),\n+      ),\n+    );\n+    return $actions;\n+  }\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public function validate(array $form, FormStateInterface $form_state) {\n+    $mail = $form_state->getValue(array('mail', 0, 'value'));\n+    // Users should login to manage their subscriptions.\n+    if (\\Drupal::currentUser()->isAnonymous() && $user = user_load_by_mail($mail)) {\n+      $message = $user->isBlocked() ?\n+        $this->t('The email address %mail belongs to a blocked user.', array('%mail' => $mail)) :\n+        $this->t('There is an account registered for the e-mail address %mail. Please log in to manage your newsletter subscriptions.', array('%mail' => $mail));\n+      $form_state->setErrorByName('mail', $message);\n+    }\n+\n+    $valid_email = valid_email_address($mail);\n+    if (!$valid_email && $form['mail']['#access']) {\n+      $form_state->setErrorByName('mail', t('The e-mail address you supplied is not valid.'));\n+    }\n+\n+    // Unless the submit handler is 'update', if the newsletter checkboxes are\n+    // available, at least one must be checked.\n+    $update = in_array('::submitUpdate', $form_state->getSubmitHandlers());\n+    if (!$update && $form['subscriptions']['#access'] && !count($form_state->getValue('subscriptions'))) {\n+      $form_state->setErrorByName('subscriptions', t('You must select at least one newsletter.'));\n+    }\n+\n+    parent::validate($form, $form_state);\n+  }\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public function submitForm(array &$form, FormStateInterface $form_state) {\n+    // Merge with any existing subscriber.\n+    $mail = $form_state->getValue(array('mail', 0, 'value'));\n+    if ($this->entity->isNew() && $subscriber = simplenews_subscriber_load_by_mail($mail)) {\n+      $this->setEntity($subscriber);\n+    }\n+\n+    parent::submitForm($form, $form_state);\n+  }\n+\n+  /**\n+   * Submit callback that subscribes to selected newsletters.\n+   *\n+   * @param array $form\n+   *   The form structure.\n+   * @param \\Drupal\\Core\\Form\\FormStateInterface $form_state\n+   *   The form state object.\n+   */\n+  public function submitSubscribe(array $form, FormStateInterface $form_state) {\n+    $mail = $form_state->getValue(array('mail', 0, 'value'));\n+    $account = user_load_by_mail($mail);\n+    simplenews_confirmation_combine(TRUE);\n+    foreach ($this->getSelectedNewsletters($form_state) as $newsletter_id) {\n+      $confirm = simplenews_require_double_opt_in($newsletter_id, $account);\n+      simplenews_subscribe($mail, $newsletter_id, $confirm, 'website');\n+    }\n+    $sent = simplenews_confirmation_send_combined();\n+    drupal_set_message($this->getSubmitMessage($form_state, static::SUBMIT_SUBSCRIBE, $sent));\n+  }\n+\n+  /**\n+   * Submit callback that unsubscribes from selected newsletters.\n+   *\n+   * @param array $form\n+   *   The form structure.\n+   * @param \\Drupal\\Core\\Form\\FormStateInterface $form_state\n+   *   The form state object.\n+   */\n+  public function submitUnsubscribe(array $form, FormStateInterface $form_state) {\n+    $mail = $form_state->getValue(array('mail', 0, 'value'));","path":"src/Form/SubscriberFormBase.php","position":246,"original_position":246,"commit_id":"fff1474368eb003477f1f54559e2dd8ee9867cf8","original_commit_id":"fff1474368eb003477f1f54559e2dd8ee9867cf8","user":{"login":"Berdir","id":40826,"avatar_url":"https://avatars.githubusercontent.com/u/40826?v=2","gravatar_id":"","url":"https://api.github.com/users/Berdir","html_url":"https://github.com/Berdir","followers_url":"https://api.github.com/users/Berdir/followers","following_url":"https://api.github.com/users/Berdir/following{/other_user}","gists_url":"https://api.github.com/users/Berdir/gists{/gist_id}","starred_url":"https://api.github.com/users/Berdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Berdir/subscriptions","organizations_url":"https://api.github.com/users/Berdir/orgs","repos_url":"https://api.github.com/users/Berdir/repos","events_url":"https://api.github.com/users/Berdir/events{/privacy}","received_events_url":"https://api.github.com/users/Berdir/received_events","type":"User","site_admin":false},"body":"Why not get the mail from the subscriber that we have at this point?","created_at":"2014-10-03T07:05:39Z","updated_at":"2014-10-03T07:05:39Z","html_url":"https://github.com/iwanfux/simplenews/pull/2#discussion_r18383584","pull_request_url":"https://api.github.com/repos/iwanfux/simplenews/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/comments/18383584"},"html":{"href":"https://github.com/iwanfux/simplenews/pull/2#discussion_r18383584"},"pull_request":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/iwanfux/simplenews/pulls/2","id":22178223,"html_url":"https://github.com/iwanfux/simplenews/pull/2","diff_url":"https://github.com/iwanfux/simplenews/pull/2.diff","patch_url":"https://github.com/iwanfux/simplenews/pull/2.patch","issue_url":"https://api.github.com/repos/iwanfux/simplenews/issues/2","number":2,"state":"open","locked":false,"title":"Personalization","user":{"login":"arildm","id":1454404,"avatar_url":"https://avatars.githubusercontent.com/u/1454404?v=2","gravatar_id":"","url":"https://api.github.com/users/arildm","html_url":"https://github.com/arildm","followers_url":"https://api.github.com/users/arildm/followers","following_url":"https://api.github.com/users/arildm/following{/other_user}","gists_url":"https://api.github.com/users/arildm/gists{/gist_id}","starred_url":"https://api.github.com/users/arildm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arildm/subscriptions","organizations_url":"https://api.github.com/users/arildm/orgs","repos_url":"https://api.github.com/users/arildm/repos","events_url":"https://api.github.com/users/arildm/events{/privacy}","received_events_url":"https://api.github.com/users/arildm/received_events","type":"User","site_admin":false},"body":"@Berdir asked specifically to review this branch, please leave the merging to him.","created_at":"2014-10-02T23:40:37Z","updated_at":"2014-10-03T07:05:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iwanfux/simplenews/pulls/2/commits","review_comments_url":"https://api.github.com/repos/iwanfux/simplenews/pulls/2/comments","review_comment_url":"https://api.github.com/repos/iwanfux/simplenews/pulls/comments/{number}","comments_url":"https://api.github.com/repos/iwanfux/simplenews/issues/2/comments","statuses_url":"https://api.github.com/repos/iwanfux/simplenews/statuses/fff1474368eb003477f1f54559e2dd8ee9867cf8","head":{"label":"iwanfux:personalization","ref":"personalization","sha":"fff1474368eb003477f1f54559e2dd8ee9867cf8","user":{"login":"iwanfux","id":7438841,"avatar_url":"https://avatars.githubusercontent.com/u/7438841?v=2","gravatar_id":"","url":"https://api.github.com/users/iwanfux","html_url":"https://github.com/iwanfux","followers_url":"https://api.github.com/users/iwanfux/followers","following_url":"https://api.github.com/users/iwanfux/following{/other_user}","gists_url":"https://api.github.com/users/iwanfux/gists{/gist_id}","starred_url":"https://api.github.com/users/iwanfux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwanfux/subscriptions","organizations_url":"https://api.github.com/users/iwanfux/orgs","repos_url":"https://api.github.com/users/iwanfux/repos","events_url":"https://api.github.com/users/iwanfux/events{/privacy}","received_events_url":"https://api.github.com/users/iwanfux/received_events","type":"User","site_admin":false},"repo":{"id":19273827,"name":"simplenews","full_name":"iwanfux/simplenews","owner":{"login":"iwanfux","id":7438841,"avatar_url":"https://avatars.githubusercontent.com/u/7438841?v=2","gravatar_id":"","url":"https://api.github.com/users/iwanfux","html_url":"https://github.com/iwanfux","followers_url":"https://api.github.com/users/iwanfux/followers","following_url":"https://api.github.com/users/iwanfux/following{/other_user}","gists_url":"https://api.github.com/users/iwanfux/gists{/gist_id}","starred_url":"https://api.github.com/users/iwanfux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwanfux/subscriptions","organizations_url":"https://api.github.com/users/iwanfux/orgs","repos_url":"https://api.github.com/users/iwanfux/repos","events_url":"https://api.github.com/users/iwanfux/events{/privacy}","received_events_url":"https://api.github.com/users/iwanfux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iwanfux/simplenews","description":"Newsletter Module Drupal","fork":false,"url":"https://api.github.com/repos/iwanfux/simplenews","forks_url":"https://api.github.com/repos/iwanfux/simplenews/forks","keys_url":"https://api.github.com/repos/iwanfux/simplenews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iwanfux/simplenews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iwanfux/simplenews/teams","hooks_url":"https://api.github.com/repos/iwanfux/simplenews/hooks","issue_events_url":"https://api.github.com/repos/iwanfux/simplenews/issues/events{/number}","events_url":"https://api.github.com/repos/iwanfux/simplenews/events","assignees_url":"https://api.github.com/repos/iwanfux/simplenews/assignees{/user}","branches_url":"https://api.github.com/repos/iwanfux/simplenews/branches{/branch}","tags_url":"https://api.github.com/repos/iwanfux/simplenews/tags","blobs_url":"https://api.github.com/repos/iwanfux/simplenews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iwanfux/simplenews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iwanfux/simplenews/git/refs{/sha}","trees_url":"https://api.github.com/repos/iwanfux/simplenews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iwanfux/simplenews/statuses/{sha}","languages_url":"https://api.github.com/repos/iwanfux/simplenews/languages","stargazers_url":"https://api.github.com/repos/iwanfux/simplenews/stargazers","contributors_url":"https://api.github.com/repos/iwanfux/simplenews/contributors","subscribers_url":"https://api.github.com/repos/iwanfux/simplenews/subscribers","subscription_url":"https://api.github.com/repos/iwanfux/simplenews/subscription","commits_url":"https://api.github.com/repos/iwanfux/simplenews/commits{/sha}","git_commits_url":"https://api.github.com/repos/iwanfux/simplenews/git/commits{/sha}","comments_url":"https://api.github.com/repos/iwanfux/simplenews/comments{/number}","issue_comment_url":"https://api.github.com/repos/iwanfux/simplenews/issues/comments/{number}","contents_url":"https://api.github.com/repos/iwanfux/simplenews/contents/{+path}","compare_url":"https://api.github.com/repos/iwanfux/simplenews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iwanfux/simplenews/merges","archive_url":"https://api.github.com/repos/iwanfux/simplenews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iwanfux/simplenews/downloads","issues_url":"https://api.github.com/repos/iwanfux/simplenews/issues{/number}","pulls_url":"https://api.github.com/repos/iwanfux/simplenews/pulls{/number}","milestones_url":"https://api.github.com/repos/iwanfux/simplenews/milestones{/number}","notifications_url":"https://api.github.com/repos/iwanfux/simplenews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iwanfux/simplenews/labels{/name}","releases_url":"https://api.github.com/repos/iwanfux/simplenews/releases{/id}","created_at":"2014-04-29T11:17:56Z","updated_at":"2014-06-23T12:06:23Z","pushed_at":"2014-10-02T16:31:17Z","git_url":"git://github.com/iwanfux/simplenews.git","ssh_url":"git@github.com:iwanfux/simplenews.git","clone_url":"https://github.com/iwanfux/simplenews.git","svn_url":"https://github.com/iwanfux/simplenews","homepage":null,"size":2552,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"7.x-2.x"}},"base":{"label":"iwanfux:8.x-1.x","ref":"8.x-1.x","sha":"bfd1c95c97fb1628383cbaddc600bcc3900080c4","user":{"login":"iwanfux","id":7438841,"avatar_url":"https://avatars.githubusercontent.com/u/7438841?v=2","gravatar_id":"","url":"https://api.github.com/users/iwanfux","html_url":"https://github.com/iwanfux","followers_url":"https://api.github.com/users/iwanfux/followers","following_url":"https://api.github.com/users/iwanfux/following{/other_user}","gists_url":"https://api.github.com/users/iwanfux/gists{/gist_id}","starred_url":"https://api.github.com/users/iwanfux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwanfux/subscriptions","organizations_url":"https://api.github.com/users/iwanfux/orgs","repos_url":"https://api.github.com/users/iwanfux/repos","events_url":"https://api.github.com/users/iwanfux/events{/privacy}","received_events_url":"https://api.github.com/users/iwanfux/received_events","type":"User","site_admin":false},"repo":{"id":19273827,"name":"simplenews","full_name":"iwanfux/simplenews","owner":{"login":"iwanfux","id":7438841,"avatar_url":"https://avatars.githubusercontent.com/u/7438841?v=2","gravatar_id":"","url":"https://api.github.com/users/iwanfux","html_url":"https://github.com/iwanfux","followers_url":"https://api.github.com/users/iwanfux/followers","following_url":"https://api.github.com/users/iwanfux/following{/other_user}","gists_url":"https://api.github.com/users/iwanfux/gists{/gist_id}","starred_url":"https://api.github.com/users/iwanfux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwanfux/subscriptions","organizations_url":"https://api.github.com/users/iwanfux/orgs","repos_url":"https://api.github.com/users/iwanfux/repos","events_url":"https://api.github.com/users/iwanfux/events{/privacy}","received_events_url":"https://api.github.com/users/iwanfux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iwanfux/simplenews","description":"Newsletter Module Drupal","fork":false,"url":"https://api.github.com/repos/iwanfux/simplenews","forks_url":"https://api.github.com/repos/iwanfux/simplenews/forks","keys_url":"https://api.github.com/repos/iwanfux/simplenews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iwanfux/simplenews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iwanfux/simplenews/teams","hooks_url":"https://api.github.com/repos/iwanfux/simplenews/hooks","issue_events_url":"https://api.github.com/repos/iwanfux/simplenews/issues/events{/number}","events_url":"https://api.github.com/repos/iwanfux/simplenews/events","assignees_url":"https://api.github.com/repos/iwanfux/simplenews/assignees{/user}","branches_url":"https://api.github.com/repos/iwanfux/simplenews/branches{/branch}","tags_url":"https://api.github.com/repos/iwanfux/simplenews/tags","blobs_url":"https://api.github.com/repos/iwanfux/simplenews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iwanfux/simplenews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iwanfux/simplenews/git/refs{/sha}","trees_url":"https://api.github.com/repos/iwanfux/simplenews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iwanfux/simplenews/statuses/{sha}","languages_url":"https://api.github.com/repos/iwanfux/simplenews/languages","stargazers_url":"https://api.github.com/repos/iwanfux/simplenews/stargazers","contributors_url":"https://api.github.com/repos/iwanfux/simplenews/contributors","subscribers_url":"https://api.github.com/repos/iwanfux/simplenews/subscribers","subscription_url":"https://api.github.com/repos/iwanfux/simplenews/subscription","commits_url":"https://api.github.com/repos/iwanfux/simplenews/commits{/sha}","git_commits_url":"https://api.github.com/repos/iwanfux/simplenews/git/commits{/sha}","comments_url":"https://api.github.com/repos/iwanfux/simplenews/comments{/number}","issue_comment_url":"https://api.github.com/repos/iwanfux/simplenews/issues/comments/{number}","contents_url":"https://api.github.com/repos/iwanfux/simplenews/contents/{+path}","compare_url":"https://api.github.com/repos/iwanfux/simplenews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iwanfux/simplenews/merges","archive_url":"https://api.github.com/repos/iwanfux/simplenews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iwanfux/simplenews/downloads","issues_url":"https://api.github.com/repos/iwanfux/simplenews/issues{/number}","pulls_url":"https://api.github.com/repos/iwanfux/simplenews/pulls{/number}","milestones_url":"https://api.github.com/repos/iwanfux/simplenews/milestones{/number}","notifications_url":"https://api.github.com/repos/iwanfux/simplenews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iwanfux/simplenews/labels{/name}","releases_url":"https://api.github.com/repos/iwanfux/simplenews/releases{/id}","created_at":"2014-04-29T11:17:56Z","updated_at":"2014-06-23T12:06:23Z","pushed_at":"2014-10-02T16:31:17Z","git_url":"git://github.com/iwanfux/simplenews.git","ssh_url":"git@github.com:iwanfux/simplenews.git","clone_url":"https://github.com/iwanfux/simplenews.git","svn_url":"https://github.com/iwanfux/simplenews","homepage":null,"size":2552,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"7.x-2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/2"},"html":{"href":"https://github.com/iwanfux/simplenews/pull/2"},"issue":{"href":"https://api.github.com/repos/iwanfux/simplenews/issues/2"},"comments":{"href":"https://api.github.com/repos/iwanfux/simplenews/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/iwanfux/simplenews/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/iwanfux/simplenews/statuses/fff1474368eb003477f1f54559e2dd8ee9867cf8"}}}}