Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion client/objects/GitHubCommitCommitAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,44 @@ protected function getAttributes()
'email' => 'string',
));
}


/**
* @var string
*/
protected $name;

/**
* @var string
*/
protected $date;

/**
* @var string
*/
protected $email;

/**
* @return string
*/
public function getName()
{
return $this->name;
}

/**
* @return string
*/
public function getDate()
{
return $this->date;
}

/**
* @return string
*/
public function getEmail()
{
return $this->email;
}
}

30 changes: 29 additions & 1 deletion client/services/GitHubIssues.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,39 @@ public function listAllIssues($owner = false, $filter = null, $state = null, $la
/**
* List issues
*
* @param $milestone number (Optional) - Milestone to associate this issue with.
* @param state string Indicates the state of the issues to return. Can be either open, closed, or all. Default: open
* @param $assignee string (Optional) - Login for the user that this issue should be assigned to.
* @param $creator string (Optional) - Login for the user that created this issue.
* @param $mentioned string (Optional) - Login for a user mentioned in this issue.
* @param labels string A list of comma separated label names. Example: bug,ui,@high
* @param sort string What to sort results by. Can be either created, updated, comments. Default: created
* @param direction string The direction of the sort. Can be either asc or desc. Default: desc
* @param since string Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
*
* @return array<GitHubIssue>
*/
public function listIssues($owner, $repo)
public function listIssues($owner, $repo, $milestone = null, $state = null, $assignee = null, $creator = null, $mentioned = null, $labels = null, $sort = null, $direction = null, $since = null)
{
$data = array();
if(!is_null($milestone))
$data['milestone'] = $milestone;
if(!is_null($state))
$data['state'] = $state;
if(!is_null($assignee))
$data['assignee'] = $assignee;
if(!is_null($creator))
$data['creator'] = $creator;
if(!is_null($mentioned))
$data['mentioned'] = $mentioned;
if(!is_null($labels))
$data['labels'] = $labels;
if(!is_null($sort))
$data['sort'] = $sort;
if(!is_null($direction))
$data['direction'] = $direction;
if(!is_null($since))
$data['since'] = $since;

return $this->client->request("/repos/$owner/$repo/issues", 'GET', $data, 200, 'GitHubIssue', true);
}
Expand Down
26 changes: 26 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) <year> <copyright holders>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.




Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:



The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.



THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.