{"modulePath":"github.com/lf-engineering/easycla-api","version":"v0.0.0-20230119185237-4d82e2915bdc","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Functions\n\n```go\nfunc GetIDFromUsername(username string) (int64, error)\n```\nGetIDFromUsername function returns github id of the user with provided github username\n\n```go\nfunc GetUserGithubOrganizations(username string) ([]string, error)\n```\nGetUserGithubOrganizations returns list of organizations of which given user is part of. It only returns organizations of the user where organization membership info is public. It takes github username as input.\n\n```go\nfunc GetUsernameFromID(id int64) (string, error)\n```\nGetUsernameFromID function returns github username of provided github user id.\n\n```go\nfunc Init(conf config.Config)\n```\nInit function initialize github service. service is used internally only by this package. TODO() : add authorization in client.\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient is container for go-github Client\n\n```go\nfunc NewGithubAppClient(installationID int64) (*Client, error)\n```\nNewGithubAppClient function creates github client for installation\n\n```go\nfunc (gc *Client) ListCommits(owner string, repo string, pullReqNumber int) (*Commits, error)\n```\nListCommits returns list of commits on pull request\n\n```go\ntype CommitAuthor struct {\n\tSHA            string\n\tAuthorID       int64\n\tAuthorUsername string\n\tAuthorEmail    string\n}\n```\nCommitAuthor is information about author of particular commit\n\n```go\ntype Commits struct {\n\t// contains filtered or unexported fields\n}\n```\nCommits contains commits for particular pull request\n\n```go\nfunc (c *Commits) GetCommitAuthors() []*CommitAuthor\n```\nGetCommitAuthors function return list of authors of pull request\n\n","path":"github.com/lf-engineering/easycla-api/github","name":"github","synopsis":"","isRedistributable":true}
