ghtrack package
Submodules
ghtrack.CommandLineUtil module
ghtrack.EmailHandler module
- class ghtrack.EmailHandler.EmailHandler(filename: Optional[str] = None, emailConf: ghtrack.GhTrackObject.EmailConf = EmailConf(to='zinalacina@gmail.com', subject='Pull request Test', sendGridApi='', fromEmail='zlacina@gmail.com'), repoConf: ghtrack.GhTrackObject.Repo = Repo(user='kubernetes', repo='kubernetes'), authToken: ghtrack.GhTrackObject.Auth = Auth(token=''))
Bases:
ghtrack.GhTrackObject.GhTrackObjectEmailHandler is use to send email through twilio.
- sendEmail(content: str) tuple
ghtrack.GhTrack module
- class ghtrack.GhTrack.GhTrack(file_name=None, token=None, email=None, user=None, repo=None)
Bases:
ghtrack.GhTrackObject.GhTrackObjectClass to pull down the pull request of a github public repositories for a user.
- getPull(number)
- getPulls()
- getPullsByStatus(status: str)
- getRepo()
- sendEmailOrPrintConsole(emailNotConsole: bool = False) str
- setAge(age: int)
ghtrack.GhTrackException module
- exception ghtrack.GhTrackException.BadUserException(status, data, headers)
Bases:
ghtrack.GhTrackException.GhTrackExceptionBadUserException is raised when request the user which repos you try to pull does not exist.
- exception ghtrack.GhTrackException.GhTrackException(status, data, headers)
Bases:
ExceptionThis class contains all the possible exceptions that you can encounter during the execution of this project.
- property data
The data returned by the Github API
- property headers
The headers returned by the Github API
- property status
The status returned by the Github API
- exception ghtrack.GhTrackException.NotFoundException(status, data, headers)
Bases:
ghtrack.GhTrackException.GhTrackExceptionNotFoundException is raised when Github API return 404 status
- exception ghtrack.GhTrackException.RateLimitExceededException(status, data, headers)
Bases:
ghtrack.GhTrackException.GhTrackExceptionRateLimitExceededException is raised when the rate limit is exceeded github replies with 403
- exception ghtrack.GhTrackException.RepoNotFoundException(status, data, headers)
Bases:
ghtrack.GhTrackException.GhTrackExceptionRepoNotFoundException is raised when Github can not find the public repo
- exception ghtrack.GhTrackException.UnknownApiQueryException(status, data, headers)
Bases:
ghtrack.GhTrackException.GhTrackExceptionUnknownApiQueryException is raised when Github can not find the public repo
ghtrack.GhTrackObject module
- class ghtrack.GhTrackObject.Auth(token: str = '')
Bases:
objectAuth class. Github token configurations.
- token: str = ''
- class ghtrack.GhTrackObject.EmailConf(to: str = 'zinalacina@gmail.com', subject: str = 'Pull request Test', sendGridApi: str = '', fromEmail: str = 'zlacina@gmail.com')
Bases:
objectEmailConf class. Email configurations.
- fromEmail: str = 'zlacina@gmail.com'
- sendGridApi: str = ''
- subject: str = 'Pull request Test'
- to: str = 'zinalacina@gmail.com'
- class ghtrack.GhTrackObject.GhTrackObject(filename: Optional[str] = None, emailConf: ghtrack.GhTrackObject.EmailConf = EmailConf(to='zinalacina@gmail.com', subject='Pull request Test', sendGridApi='', fromEmail='zlacina@gmail.com'), repoConf: ghtrack.GhTrackObject.Repo = Repo(user='kubernetes', repo='kubernetes'), authToken: ghtrack.GhTrackObject.Auth = Auth(token=''))
Bases:
objectGhTrackObject class. Contents the configuration information coming from data/config.yml and also default value.
- authToken: ghtrack.GhTrackObject.Auth = Auth(token='')
- emailConf: ghtrack.GhTrackObject.EmailConf = EmailConf(to='zinalacina@gmail.com', subject='Pull request Test', sendGridApi='', fromEmail='zlacina@gmail.com')
- filename: str = None
- getConf(file_name: str) -> (<class 'ghtrack.GhTrackObject.EmailConf'>, <class 'ghtrack.GhTrackObject.Repo'>, <class 'ghtrack.GhTrackObject.Auth'>)
- repoConf: ghtrack.GhTrackObject.Repo = Repo(user='kubernetes', repo='kubernetes')
ghtrack.RequestInit module
- class ghtrack.RequestInit.RequestInit(token, apiUrl='https://api.github.com/repos/')
Bases:
objectThis class initialize the requests object with default and required values
- dataRequest(url, parameters=None, body='', old: int = 7)
- getCompleteUrl(url, parameters=None)
- getToken()
- statusRequest(url, parameters, input)