Ejemplo n.º 1
0
 protected function adaptIssueStructure(array $issue)
 {
     return ['url' => $issue['html_url'], 'number' => $issue['number'], 'state' => $issue['state'], 'title' => $issue['title'], 'body' => $issue['body'], 'user' => $issue['user']['login'], 'labels' => ArrayUtil::getValuesFromNestedArray($issue['labels'], 'name'), 'assignee' => $issue['assignee']['login'], 'milestone' => $issue['milestone']['title'], 'created_at' => new \DateTime($issue['created_at']), 'updated_at' => !empty($issue['updated_at']) ? new \DateTime($issue['updated_at']) : null, 'closed_by' => !empty($issue['closed_by']) ? $issue['closed_by']['login'] : null, 'pull_request' => isset($issue['pull_request'])];
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getLabels()
 {
     return ArrayUtil::getValuesFromNestedArray($this->client->api('projects')->labels($this->getCurrentProject()->id), 'name');
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function getMilestones(array $parameters = [])
 {
     $response = $this->client->apiIssues()->milestones()->all($this->getUsername(), $this->getRepository());
     $resultArray = json_decode($response->getContent(), true);
     return ArrayUtil::getValuesFromNestedArray($resultArray, 'name');
 }