RoboFile.php
protected function sortChanges($log_entries, $github_token) {
    $client = new Client();
    $client->authenticate($github_token, NULL, Client::AUTH_URL_TOKEN);
    /** @var \Github\Api\Issue $issue_api */
    $issue_api = $client->api('issue');

    $changes = [
      'breaking' => [],
      'enhancements' => [],
      'bugs' => [],
      'misc' => [],
    ];
    foreach ($log_entries as $log_entry) {
      $changes = $this->sortLogEntry($log_entry, $issue_api, $changes);
    }
    return $changes;
  }
protected function sortChanges($log_entries, $github_token) {
    $client = new Client();
    $client->authenticate($github_token, NULL, Client::AUTH_URL_TOKEN);
    /** @var \Github\Api\Issue $issue_api */
    $issue_api = $client->api('issue');

    $changes = [
      'breaking' => [],
      'enhancements' => [],
      'bugs' => [],
      'misc' => [],
    ];
    foreach ($log_entries as $log_entry) {
      $changes = $this->sortLogEntry($log_entry, $issue_api, $changes);
    }
    return $changes;
  }
protected function sortChanges ( $ log_entries , $ github_token ) { $ client = new Client ( ) ; $ client -> authenticate ( $ github_token , NULL , Client :: AUTH_URL_TOKEN ) ; /** @var \Github\Api\Issue $issue_api */ $ issue_api = $ client -> api ( 'issue' ) ; $ changes = [ 'breaking' => [ ] , 'enhancements' => [ ] , 'bugs' => [ ] , 'misc' => [ ] , ] ; foreach ( $ log_entries as $ log_entry ) { $ changes = $ this -> sortLogEntry ( $ log_entry , $ issue_api , $ changes ) ; } return $ changes ; }
Sorts an array of log changes based on GitHub issue labels.

This method will iterate over an array of log changes, use a regular
expression to identify GitHub issue numbers, and use the GitHub API to
fetch the labels for those issues.

@param array $log_entries
An array of log changes. Typically each row would be a commit message.

@return array
A multidimensional array grouped by the labels enhancement and bug.
Sorts an array of log changes based on GitHub issue labels .