{"action":"created","comment":{"url":"https://api.github.com/repos/ding2/ding2/pulls/comments/50706673","id":50706673,"diff_hunk":"@@ -0,0 +1,397 @@\n+<?php\n+/**\n+ * @file\n+ * Handles user creation in the provider with information from WAYF login.\n+ */\n+\n+/**\n+ * Implements hook_permission().\n+ */\n+function ding_wayf_dk_create_user_permission() {\n+  return array(\n+    'administer wayf user creation' => array(\n+      'title' => t('Administer WAYF (user creation)'),\n+    ),\n+  );\n+}\n+\n+/**\n+ * Implements hook_menu().\n+ */\n+function ding_wayf_dk_create_user_menu() {\n+  $items = array();\n+\n+  $items['wayf/create-user/before-page'] = array(\n+    'title' => 'Create new user information page',\n+    'description' => 'Create new user using WAYF login.',\n+    'page callback' => 'ding_wayf_dk_create_user_info_page',\n+    'access callback' => TRUE,\n+    'type' => MENU_CALLBACK,\n+  );\n+\n+  $items['wayf/create-user/notice'] = array(\n+    'title' => 'User creation notice',\n+    'description' => 'Notice about account creation.',\n+    'page callback' => 'ding_wayf_dk_create_user_notice',\n+    'access callback' => TRUE,\n+    'type' => MENU_CALLBACK,\n+  );\n+\n+  $items['wayf/create-user/form'] = array(\n+    'title' => 'User creation form',\n+    'description' => 'Form used to account creation.',\n+    'page callback' => 'drupal_get_form',\n+    'page arguments' => array('ding_wayf_dk_create_user_form'),\n+    'access callback' => TRUE,\n+    'type' => MENU_CALLBACK,\n+  );\n+\n+  return $items;\n+}\n+\n+/**\n+ * Implements hook_ctools_plugin_directory().\n+ */\n+function ding_wayf_dk_create_user_ctools_plugin_directory($owner, $plugin_type) {\n+  return 'plugins/' . $plugin_type;\n+}\n+\n+/**\n+ * Implements hook_wayf_dk_login_authenticate_result_alter().\n+ *\n+ * Store the schacPersonalUniqueID in session to use later when send user create\n+ * to the provider.\n+ */\n+function ding_wayf_dk_create_user_wayf_dk_login_authenticate_result_alter($result) {\n+  if (isset($_SESSION['ding_wayf_dk_login_destination']) && $_SESSION['ding_wayf_dk_login_destination'] == 'wayf/create-user/form') {\n+    // Extract unique id form the WAYF attributes (the CPR number).\n+    preg_match('/\\d{10}$/', reset($result['attributes']['schacPersonalUniqueID']), $unique_id);\n+    $unique_id = reset($unique_id);\n+\n+    // Check if age limit should be set.\n+    $limit = variable_get('ding_wayf_user_create_age_limit', '');\n+    if (!empty($limit) && is_numeric($limit)) {\n+\n+      // Magic function to get the 1900, 1800 or 2000 prefixes for year.\n+      // @see http://da.wikipedia.org/wiki/CPR-nummer\n+      $year = substr($unique_id, 4, 2);\n+      switch (substr($unique_id, 6, 1)) {\n+        case 0:\n+        case 1:\n+        case 2:\n+        case 3:\n+          $year = '19' . $year;\n+          break;\n+\n+        case 4:\n+        case 9:\n+          $year = $year > 36 ? '19' . $year : '20' . $year;\n+          break;\n+\n+        case 5:\n+        case 6:\n+        case 7:\n+        case 8:\n+          $year = $year > 57 ? '18' . $year : '20' . $year;\n+          break;\n+      }\n+\n+      // Create date time object to use it's diff method.\n+      $from = new DateTime();\n+      $from->setDate($year, substr($unique_id, 2, 2), substr($unique_id, 0, 2));\n+      $to = new DateTime('tomorrow');\n+\n+      // Check if limit have been reached.\n+      if ($from->diff($to)->y < $limit) {\n+        // The age limit has to kick in.\n+        drupal_set_message('You are not allowed to automatically be created because of the age limit. Please go to your local library to registry.');\n+\n+        // Redirect to front page.\n+        drupal_goto('<front>');\n+      }\n+    }\n+\n+    $_SESSION['ding_wayf_dk_create_user'] = $unique_id;\n+  }\n+}\n+\n+/**\n+ * Implements hook_form_wayf_dk_login__settings_form_alter().\n+ */\n+function ding_wayf_dk_create_user_form_wayf_dk_login__settings_form_alter(&$form, &$form_state, $form_id) {\n+  $form['user'] = array(\n+    '#type' => 'fieldset',\n+    '#title' => t('Create user'),\n+    '#group' => 'tabs',\n+  );\n+\n+  $form['user']['ding_wayf_user_create_age_limit'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Age limit'),\n+    '#description' => t('If set the CPR number will be used to set an age limit. If empty no limit exists.'),\n+    '#default_value' => variable_get('ding_wayf_user_create_age_limit', ''),\n+  );\n+\n+  // Define before create info page.\n+  $form['user']['ding_wayf_user_create_before_info'] = array(\n+    '#type' => 'fieldset',\n+    '#tree' => TRUE,\n+    '#collapsible' => TRUE,\n+    '#collapsed' => TRUE,\n+    '#title' => t('User creating info pager (before)'),\n+    '#description' => t('Information to display on the page displayed when the user clicks on the create user link.'),\n+  );\n+\n+  $defaults = variable_get('ding_wayf_user_create_before_info', array());\n+  $form['user']['ding_wayf_user_create_before_info']['title'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Title'),\n+    '#default_value' => isset($defaults['title']) ? $defaults['title'] : '',\n+  );\n+\n+  $form['user']['ding_wayf_user_create_before_info']['content'] = array(\n+    '#type' => 'textarea',\n+    '#title' => t('Content'),\n+    '#default_value' => isset($defaults['content']) ? $defaults['content'] : '',\n+  );\n+\n+  $form['user']['ding_wayf_user_create_before_info']['link'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Link title'),\n+    '#default_value' => isset($defaults['link']) ? $defaults['link'] : '',\n+  );\n+\n+  // Accepting text.\n+  $form['user']['ding_wayf_user_create_accpect_text'] = array(\n+    '#type' => 'textarea',\n+    '#title' => t('Accept text'),\n+    '#default_value' => variable_get('ding_wayf_user_create_accpect_text', ''),\n+    '#description' => t('The text that is display next to the user create accept check box.'),\n+  );\n+\n+  // Define after create info page.\n+  $form['user']['ding_wayf_user_create_after_info'] = array(\n+    '#type' => 'fieldset',\n+    '#tree' => TRUE,\n+    '#collapsible' => TRUE,\n+    '#collapsed' => TRUE,\n+    '#title' => t('User creating info pager (after)'),\n+    '#description' => t('Information to display on the page displayed when the user have sent a creation request.'),\n+  );\n+\n+  $defaults = variable_get('ding_wayf_user_create_after_info', array());\n+  $form['user']['ding_wayf_user_create_after_info']['title'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Title'),\n+    '#default_value' => isset($defaults['title']) ? $defaults['title'] : '',\n+  );\n+\n+  $form['user']['ding_wayf_user_create_after_info']['content'] = array(\n+    '#type' => 'textarea',\n+    '#title' => t('Content'),\n+    '#default_value' => isset($defaults['content']) ? $defaults['content'] : '',\n+  );\n+}\n+\n+/**\n+ * Implements hook_theme().\n+ */\n+function ding_wayf_dk_create_user_theme($existing, $type, $theme, $path) {\n+  return array(\n+    'ding_wayf_dk_info_page' => array(\n+      'template' => 'ding-wayf-dk-info-page',\n+      'variables' => array(\n+        'title' => array(),\n+        'content' => array(),\n+        'link' => NULL,\n+      ),\n+      'path' => $path . '/templates',\n+    ),\n+    'ding_wayf_dk_create_user_link' => array(\n+      'template' => 'ding-wayf-dk-create-user-link',\n+      'variables' => array(\n+        'link' => NULL,\n+      ),\n+      'path' => $path . '/templates',\n+    ),\n+  );\n+}\n+\n+/**\n+ * Menu callback for information page before user creation.\n+ */\n+function ding_wayf_dk_create_user_info_page() {\n+  // Get texts from the configuration.\n+  $values = variable_get('ding_wayf_user_create_before_info', array());\n+\n+  return array(\n+    '#theme' => 'ding_wayf_dk_info_page',\n+    '#title' => empty($values['title']) ? t('Not configured.') : $values['title'],\n+    '#content' => empty($values['content']) ? t('Please configure WAYF configuration to get content on this page under <a href=\"/admin/config/people/wayf\">admin/config/people/wayf</a>.') : $values['content'],\n+    '#link' => array(\n+      '#theme' => 'link',\n+      '#text' => empty($values['link']) ? t('Register as new user') : $values['link'],\n+      '#path' => 'wayf/consume',\n+      '#options' => array(\n+        'attributes' => array(\n+          'class' => array(),\n+        ),\n+        'query' => array(\n+          'destination' => 'wayf/create-user/form',\n+        ),\n+        'html' => TRUE,\n+      ),\n+    ),\n+  );\n+}\n+\n+/**\n+ * Menu callback for information page after user creation.\n+ */\n+function ding_wayf_dk_create_user_notice() {\n+  // Get texts from the configuration.\n+  $values = variable_get('ding_wayf_user_create_after_info', array());\n+\n+  return array(\n+    '#theme' => 'ding_wayf_dk_info_page',\n+    '#title' => empty($values['title']) ? t('Not configured.') : $values['title'],\n+    '#content' => empty($values['content']) ? t('Please configure WAYF configuration to get content on this page under <a href=\"/admin/config/people/wayf\">admin/config/people/wayf</a>.') : $values['content'],\n+  );\n+}\n+\n+/**\n+ * Menu callback to create the user creation form.\n+ */\n+function ding_wayf_dk_create_user_form() {\n+  // Remove all message from the normal login, that have not succeed.\n+  drupal_get_messages(NULL, TRUE);\n+\n+  // Check if user have been logged in.\n+  if (user_is_logged_in()) {\n+    // User is logged in and have an account.\n+    drupal_set_message(t('You already have an user account at the library. So we have just logged you in.'));\n+\n+    // Ensure session information is removed.\n+    unset($_SESSION['ding_wayf_dk_create_user']);\n+    unset($_SESSION['ding_wayf_dk_login_destination']);\n+\n+    // Send user to front page.\n+    drupal_goto('<front>');\n+  }\n+\n+  // This is a little hack to get around the panels design requirements of the\n+  // ddbasic theme.\n+  $form = array(\n+    '#prefix' => '<div class=\"default-layout\"><div class=\"layout-wrapper\">',\n+    '#suffix' => '<br /></div></div>',\n+  );\n+\n+  $form['accept'] = array(\n+    '#type' => 'checkbox',\n+    '#title' => t('I accept the user agreements'),\n+    '#description' => variable_get('ding_wayf_user_create_accpect_text', ''),\n+    '#required' => TRUE,\n+  );\n+\n+  $form['name'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Name'),\n+    '#description' => t('You full name.'),\n+    '#maxlength' => 100,\n+    '#required' => TRUE,\n+    '#attributes' => array(\n+      'autocomplete' => 'off',\n+    ),\n+  );\n+\n+  $form['mail'] = array(\n+    '#type' => 'textfield',\n+    '#title' => t('Email address'),\n+    '#description' => t('The Email address that we can use to get in contact with you.'),\n+    '#required' => TRUE,\n+    '#attributes' => array(\n+      'autocomplete' => 'off',\n+    ),\n+  );\n+\n+  // Get branch options form the active provider.\n+  global $user;\n+  $provider = _ding_provider_get_provider('reservation');\n+  $options = ding_provider_invoke('reservation', 'options', $user);\n+  $form['branch'] = $options[$provider['module'] . '_preferred_branch'];\n+\n+  $form['pin'] = array(\n+    '#type' => 'password',\n+    '#title' => t('Pin code'),\n+    '#description' => t('Pin code with an max length of %length', array('%length' => ding_user_get_pincode_length())),\n+    '#size' => 10,\n+    '#maxlength' => ding_user_get_pincode_length(),\n+    '#required' => TRUE,\n+    '#attributes' => array(\n+      'autocomplete' => 'off',\n+    ),\n+  );\n+\n+  $form['submit'] = array(\n+    '#type' => 'submit',\n+    '#value' => t('Create me'),\n+  );\n+\n+  $link = '/wayf/logout';\n+  if (user_is_logged_in()) {\n+    $link = '/user/logout';\n+  }\n+  $form['cancel'] = array(\n+    '#markup' => '<a class=\"ding-wayf--cancel\" href=\"' . $link . '\">' . t('Cancel') . '</a>',\n+  );\n+\n+  $form['#submit'] = array('ding_wayf_dk_create_user_form_sbumit');\n+\n+  return $form;\n+}\n+\n+/**\n+ * Implements hook_wayf_dk_login_pre_logout().\n+ *\n+ * Ensures that session is cleaned up.\n+ */\n+function ding_wayf_dk_create_user_wayf_dk_login_pre_logout() {\n+  if (isset($_SESSION['ding_wayf_dk_login_destination'])) {\n+    unset($_SESSION['ding_wayf_dk_login_destination']);\n+  }\n+\n+  if (isset($_SESSION['ding_wayf_dk_create_user'])) {\n+    unset($_SESSION['ding_wayf_dk_create_user']);\n+  }\n+}\n+\n+/**\n+ * User creation form submit handler.\n+ */\n+function ding_wayf_dk_create_user_form_sbumit($form, &$form_state) {","path":"modules/ding_wayf_dk/modules/ding_wayf_dk_create_user/ding_wayf_dk_create_user.module","position":371,"original_position":371,"commit_id":"bd818a729c770f68f23018eacf3bd7d978ffb6ce","original_commit_id":"bd818a729c770f68f23018eacf3bd7d978ffb6ce","user":{"login":"kasperg","id":73966,"avatar_url":"https://avatars.githubusercontent.com/u/73966?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperg","html_url":"https://github.com/kasperg","followers_url":"https://api.github.com/users/kasperg/followers","following_url":"https://api.github.com/users/kasperg/following{/other_user}","gists_url":"https://api.github.com/users/kasperg/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperg/subscriptions","organizations_url":"https://api.github.com/users/kasperg/orgs","repos_url":"https://api.github.com/users/kasperg/repos","events_url":"https://api.github.com/users/kasperg/events{/privacy}","received_events_url":"https://api.github.com/users/kasperg/received_events","type":"User","site_admin":false},"body":"Typo here. That should also ensure that the submit handler is automatically assigned to the form.","created_at":"2016-01-25T15:23:24Z","updated_at":"2016-01-25T15:23:24Z","html_url":"https://github.com/ding2/ding2/pull/113#discussion_r50706673","pull_request_url":"https://api.github.com/repos/ding2/ding2/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/ding2/ding2/pulls/comments/50706673"},"html":{"href":"https://github.com/ding2/ding2/pull/113#discussion_r50706673"},"pull_request":{"href":"https://api.github.com/repos/ding2/ding2/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/ding2/ding2/pulls/113","id":56307487,"html_url":"https://github.com/ding2/ding2/pull/113","diff_url":"https://github.com/ding2/ding2/pull/113.diff","patch_url":"https://github.com/ding2/ding2/pull/113.patch","issue_url":"https://api.github.com/repos/ding2/ding2/issues/113","number":113,"state":"open","locked":false,"title":"Issue #650: WAYF support","user":{"login":"cableman","id":111397,"avatar_url":"https://avatars.githubusercontent.com/u/111397?v=3","gravatar_id":"","url":"https://api.github.com/users/cableman","html_url":"https://github.com/cableman","followers_url":"https://api.github.com/users/cableman/followers","following_url":"https://api.github.com/users/cableman/following{/other_user}","gists_url":"https://api.github.com/users/cableman/gists{/gist_id}","starred_url":"https://api.github.com/users/cableman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cableman/subscriptions","organizations_url":"https://api.github.com/users/cableman/orgs","repos_url":"https://api.github.com/users/cableman/repos","events_url":"https://api.github.com/users/cableman/events{/privacy}","received_events_url":"https://api.github.com/users/cableman/received_events","type":"User","site_admin":false},"body":"This PR adds WAYF support using patched wayf_dk module. This is an optional module for the ding_wayf module which don't require SimpleSamlPHP.\r\n\r\nThis new module ding_wayf_dk communicates directly with wayf.dk and has the option to run against DBC \"gate wayf\". The latter have not been tested yet. ","created_at":"2016-01-18T06:56:38Z","updated_at":"2016-01-25T15:23:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e3001c39f0d935ec4604e6b82862dc36ab07e2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ding2/ding2/pulls/113/commits","review_comments_url":"https://api.github.com/repos/ding2/ding2/pulls/113/comments","review_comment_url":"https://api.github.com/repos/ding2/ding2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ding2/ding2/issues/113/comments","statuses_url":"https://api.github.com/repos/ding2/ding2/statuses/bd818a729c770f68f23018eacf3bd7d978ffb6ce","head":{"label":"aakbcms:feature/wayf","ref":"feature/wayf","sha":"bd818a729c770f68f23018eacf3bd7d978ffb6ce","user":{"login":"aakbcms","id":10941069,"avatar_url":"https://avatars.githubusercontent.com/u/10941069?v=3","gravatar_id":"","url":"https://api.github.com/users/aakbcms","html_url":"https://github.com/aakbcms","followers_url":"https://api.github.com/users/aakbcms/followers","following_url":"https://api.github.com/users/aakbcms/following{/other_user}","gists_url":"https://api.github.com/users/aakbcms/gists{/gist_id}","starred_url":"https://api.github.com/users/aakbcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakbcms/subscriptions","organizations_url":"https://api.github.com/users/aakbcms/orgs","repos_url":"https://api.github.com/users/aakbcms/repos","events_url":"https://api.github.com/users/aakbcms/events{/privacy}","received_events_url":"https://api.github.com/users/aakbcms/received_events","type":"Organization","site_admin":false},"repo":{"id":49064130,"name":"ding2","full_name":"aakbcms/ding2","owner":{"login":"aakbcms","id":10941069,"avatar_url":"https://avatars.githubusercontent.com/u/10941069?v=3","gravatar_id":"","url":"https://api.github.com/users/aakbcms","html_url":"https://github.com/aakbcms","followers_url":"https://api.github.com/users/aakbcms/followers","following_url":"https://api.github.com/users/aakbcms/following{/other_user}","gists_url":"https://api.github.com/users/aakbcms/gists{/gist_id}","starred_url":"https://api.github.com/users/aakbcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakbcms/subscriptions","organizations_url":"https://api.github.com/users/aakbcms/orgs","repos_url":"https://api.github.com/users/aakbcms/repos","events_url":"https://api.github.com/users/aakbcms/events{/privacy}","received_events_url":"https://api.github.com/users/aakbcms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aakbcms/ding2","description":"Ding install profile","fork":true,"url":"https://api.github.com/repos/aakbcms/ding2","forks_url":"https://api.github.com/repos/aakbcms/ding2/forks","keys_url":"https://api.github.com/repos/aakbcms/ding2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aakbcms/ding2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aakbcms/ding2/teams","hooks_url":"https://api.github.com/repos/aakbcms/ding2/hooks","issue_events_url":"https://api.github.com/repos/aakbcms/ding2/issues/events{/number}","events_url":"https://api.github.com/repos/aakbcms/ding2/events","assignees_url":"https://api.github.com/repos/aakbcms/ding2/assignees{/user}","branches_url":"https://api.github.com/repos/aakbcms/ding2/branches{/branch}","tags_url":"https://api.github.com/repos/aakbcms/ding2/tags","blobs_url":"https://api.github.com/repos/aakbcms/ding2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aakbcms/ding2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aakbcms/ding2/git/refs{/sha}","trees_url":"https://api.github.com/repos/aakbcms/ding2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aakbcms/ding2/statuses/{sha}","languages_url":"https://api.github.com/repos/aakbcms/ding2/languages","stargazers_url":"https://api.github.com/repos/aakbcms/ding2/stargazers","contributors_url":"https://api.github.com/repos/aakbcms/ding2/contributors","subscribers_url":"https://api.github.com/repos/aakbcms/ding2/subscribers","subscription_url":"https://api.github.com/repos/aakbcms/ding2/subscription","commits_url":"https://api.github.com/repos/aakbcms/ding2/commits{/sha}","git_commits_url":"https://api.github.com/repos/aakbcms/ding2/git/commits{/sha}","comments_url":"https://api.github.com/repos/aakbcms/ding2/comments{/number}","issue_comment_url":"https://api.github.com/repos/aakbcms/ding2/issues/comments{/number}","contents_url":"https://api.github.com/repos/aakbcms/ding2/contents/{+path}","compare_url":"https://api.github.com/repos/aakbcms/ding2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aakbcms/ding2/merges","archive_url":"https://api.github.com/repos/aakbcms/ding2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aakbcms/ding2/downloads","issues_url":"https://api.github.com/repos/aakbcms/ding2/issues{/number}","pulls_url":"https://api.github.com/repos/aakbcms/ding2/pulls{/number}","milestones_url":"https://api.github.com/repos/aakbcms/ding2/milestones{/number}","notifications_url":"https://api.github.com/repos/aakbcms/ding2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aakbcms/ding2/labels{/name}","releases_url":"https://api.github.com/repos/aakbcms/ding2/releases{/id}","deployments_url":"https://api.github.com/repos/aakbcms/ding2/deployments","created_at":"2016-01-05T12:21:32Z","updated_at":"2016-01-05T12:21:38Z","pushed_at":"2016-01-25T10:38:32Z","git_url":"git://github.com/aakbcms/ding2.git","ssh_url":"git@github.com:aakbcms/ding2.git","clone_url":"https://github.com/aakbcms/ding2.git","svn_url":"https://github.com/aakbcms/ding2","homepage":"","size":79370,"stargazers_count":0,"watchers_count":0,"language":"SourcePawn","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ding2:master","ref":"master","sha":"235657915fd11b56956cd04e56a201d5869a1063","user":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"repo":{"id":1266749,"name":"ding2","full_name":"ding2/ding2","owner":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ding2/ding2","description":"Ding install profile","fork":false,"url":"https://api.github.com/repos/ding2/ding2","forks_url":"https://api.github.com/repos/ding2/ding2/forks","keys_url":"https://api.github.com/repos/ding2/ding2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ding2/ding2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ding2/ding2/teams","hooks_url":"https://api.github.com/repos/ding2/ding2/hooks","issue_events_url":"https://api.github.com/repos/ding2/ding2/issues/events{/number}","events_url":"https://api.github.com/repos/ding2/ding2/events","assignees_url":"https://api.github.com/repos/ding2/ding2/assignees{/user}","branches_url":"https://api.github.com/repos/ding2/ding2/branches{/branch}","tags_url":"https://api.github.com/repos/ding2/ding2/tags","blobs_url":"https://api.github.com/repos/ding2/ding2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ding2/ding2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ding2/ding2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ding2/ding2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ding2/ding2/statuses/{sha}","languages_url":"https://api.github.com/repos/ding2/ding2/languages","stargazers_url":"https://api.github.com/repos/ding2/ding2/stargazers","contributors_url":"https://api.github.com/repos/ding2/ding2/contributors","subscribers_url":"https://api.github.com/repos/ding2/ding2/subscribers","subscription_url":"https://api.github.com/repos/ding2/ding2/subscription","commits_url":"https://api.github.com/repos/ding2/ding2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ding2/ding2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ding2/ding2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ding2/ding2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ding2/ding2/contents/{+path}","compare_url":"https://api.github.com/repos/ding2/ding2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ding2/ding2/merges","archive_url":"https://api.github.com/repos/ding2/ding2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ding2/ding2/downloads","issues_url":"https://api.github.com/repos/ding2/ding2/issues{/number}","pulls_url":"https://api.github.com/repos/ding2/ding2/pulls{/number}","milestones_url":"https://api.github.com/repos/ding2/ding2/milestones{/number}","notifications_url":"https://api.github.com/repos/ding2/ding2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ding2/ding2/labels{/name}","releases_url":"https://api.github.com/repos/ding2/ding2/releases{/id}","deployments_url":"https://api.github.com/repos/ding2/ding2/deployments","created_at":"2011-01-18T10:54:00Z","updated_at":"2015-11-02T10:11:44Z","pushed_at":"2016-01-25T13:44:33Z","git_url":"git://github.com/ding2/ding2.git","ssh_url":"git@github.com:ding2/ding2.git","clone_url":"https://github.com/ding2/ding2.git","svn_url":"https://github.com/ding2/ding2","homepage":"","size":79493,"stargazers_count":11,"watchers_count":11,"language":"SourcePawn","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":58,"forks":30,"open_issues":58,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ding2/ding2/pulls/113"},"html":{"href":"https://github.com/ding2/ding2/pull/113"},"issue":{"href":"https://api.github.com/repos/ding2/ding2/issues/113"},"comments":{"href":"https://api.github.com/repos/ding2/ding2/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/ding2/ding2/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/ding2/ding2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ding2/ding2/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/ding2/ding2/statuses/bd818a729c770f68f23018eacf3bd7d978ffb6ce"}}}}