<s> import datetime <EOL> from lib . base import BaseGithubAction <EOL> from lib . formatters import issue_to_dict <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> class ListIssuesAction ( BaseGithubAction ) : <EOL> def run ( self , user , repo , filter = None , state = None , sort = None , <EOL> direction = None , since = None , limit = <NUM_LIT:20> ) : <EOL> user = self . _client . get_user ( user ) <EOL> repo = user . get_repo ( repo ) <EOL> kwargs = { } <EOL> if filter : <EOL> kwargs [ '<STR_LIT>' ] = filter <EOL> if state : <EOL> kwargs [ '<STR_LIT:state>' ] = state <EOL> if sort : <EOL> kwargs [ '<STR_LIT>' ] = sort <EOL> if direction : <EOL> kwargs [ '<STR_LIT>' ] = direction <EOL> if since : <EOL> kwargs [ '<STR_LIT>' ] = datetime . datetime . fromtimestamp ( since ) <EOL> issues = repo . get_issues ( ** kwargs ) <EOL> issues = list ( issues ) <EOL> result = [ ] <EOL> for index , issue in enumerate ( issues ) : <EOL> issue = issue_to_dict ( issue = issue ) <EOL> result . append ( issue ) <EOL> if ( index + <NUM_LIT:1> ) >= limit : <EOL> break <EOL> return result </s>
