{"modulePath":"github.com/andygrunwald/gotrap","version":"v0.0.0-20210622170835-75ad633e976e","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\nPackage github provides all functionality to interact with github in point of view of gotrap. This includes getting the commit status of a merge request or create a new merge request.\n\n## Types\n\n```go\ntype GithubClient struct {\n\tClient *github.Client\n\tConf   *config.GithubConfiguration\n}\n```\nGithubClient is the main data structure to interact with github. Client is to interact with github itself. Conf contains the github configuration.\n\n```go\nfunc NewGithubClient(conf *config.GithubConfiguration) *GithubClient\n```\nNewGithubClient will return a client to interact with Github. As an argument the github part of the configuration is necessary.\n\n```go\nfunc (c GithubClient) AddCommentToPullRequest(pr *github.PullRequest, message string) (bool, error)\n```\n\n```go\nfunc (c GithubClient) ClosePullRequest(pr *github.PullRequest) (bool, error)\n```\n\n```go\nfunc (c GithubClient) CreatePullRequestForPatchset(m *gerrit.Message) (*github.PullRequest, error)\n```\ncreatePullRequestForPatchset will create a new Pull Request at Github All information (like base and target branch) are received by the message by Gerrit\n\n```go\nfunc (c GithubClient) WaitUntilCommitStatusIsAvailable(pr github.PullRequest) (*github.CombinedStatus, error)\n```\nwaitUntilCommitStatusIsAvailable checks if an external service (like TravisCI) already finished the process and reports back via the Github Commit Status API\n\n```go\ntype PullRequest struct {\n\tPullRequest    *github.PullRequest\n\tCombinedStatus *github.CombinedStatus\n}\n```\n\n","path":"github.com/andygrunwald/gotrap/github","name":"github","synopsis":"Package github provides all functionality to interact with github in point of view of gotrap.","isRedistributable":true}
