Пример #1
0
 /**
  * Create object from data by GitHub API
  *
  * @param array Data from API
  * @return \Kofradia\GitHub\Event\CommitComment
  */
 public static function process($data)
 {
     $event = parent::process($data);
     $event->sender_name = $data['sender']['login'];
     $event->url = $data['comment']['html_url'];
     $event->commit_id = $data['comment']['commit_id'];
     return $event;
 }
Пример #2
0
 /**
  * Create object from data by GitHub API
  *
  * @param array Data from API
  * @return \Kofradia\GitHub\Event\WikiEvent
  */
 public static function process($data)
 {
     $event = parent::process($data);
     $event->sender_name = $data['sender']['login'];
     foreach ($data['pages'] as $page) {
         $event->processPage($page);
     }
     return $event;
 }
Пример #3
0
 /**
  * Create object from data by GitHub API
  *
  * @param array Data from API
  * @return \Kofradia\GitHub\Event\PushEvent
  */
 public static function process($data)
 {
     $event = parent::process($data);
     $event->ref = $data['ref'];
     $event->url_compare = $data['compare'];
     foreach ($data['commits'] as $commit) {
         $event->processCommit($commit);
     }
     return $event;
 }
Пример #4
0
 /**
  * Create object from data by GitHub API
  *
  * @param array Data from API
  * @return \Kofradia\GitHub\Event\IssueEvent
  */
 public static function process($data)
 {
     $event = parent::process($data);
     $event->action = $data['action'];
     $event->sender_name = $data['sender']['login'];
     $event->number = $data['issue']['number'];
     $event->title = $data['issue']['title'];
     $event->url = $data['issue']['html_url'];
     return $event;
 }