Versions in this module Expand all Collapse all v0 v0.0.5 Jul 11, 2025 Changes in this version + type GitHubRef struct + NodeID string + Object RefObject + Ref string + URL string + type RefObject struct + SHA string + Type string + URL string v0.0.4 Apr 1, 2025 v0.0.3 Mar 29, 2025 v0.0.2 Mar 29, 2025 Changes in this version + const GITHUB_TOKEN_ENV_VAR + const USER_AGENT + const VERSION + func BuildURL(baseURL string, params map[string]string) (string, error) + func CheckBranchExists(owner, repo, branch string) (bool, error) + func CheckUserExists(username string) (bool, error) + func CreateGitHubError(status int, response interface{}) error + func FormatGitHubError(err error) string + func GitHubRequest(urlStr string, method string, body interface{}, apiReqs *APIRequirements) (interface{}, error) + func IsGitHubError(err error) bool + func ValidateBranchName(branch string) (string, error) + func ValidateOwnerName(owner string) (string, error) + func ValidateRepositoryName(name string) (string, error) + type APIRequirements struct + Token string + func GetGitHubAPIRequirementsFromContext(ctx context.Context) *APIRequirements + type CodeResult struct + GitURL string + HTMLURL string + Name string + Path string + Repository GitHubRepository + SHA string + URL string + type CommitAuthor struct + Date time.Time + Email string + Name string + type CommitData struct + Author CommitAuthor + CommentCount int + Committer CommitAuthor + Message string + Tree CommitRef + URL string + Verification Verification + type CommitRef struct + SHA string + URL string + type FileContent struct + Content string + DownloadURL string + Encoding string + GitURL string + HTMLURL string + Name string + Path string + SHA string + Size int + Type string + URL string + type GitHubAuthenticationError struct + func (e *GitHubAuthenticationError) Error() string + type GitHubBranch struct + Commit CommitRef + Name string + Protected bool + type GitHubCommit struct + Author *GitHubUser + CommentsURL string + Commit CommitData + Committer *GitHubUser + HTMLURL string + NodeID string + Parents []CommitRef + SHA string + URL string + type GitHubConflictError struct + func (e *GitHubConflictError) Error() string + type GitHubError struct + Message string + Response interface{} + Status int + func (e *GitHubError) Error() string + type GitHubIssue struct + Assignee *GitHubUser + Assignees []GitHubUser + AuthorAssociation string + Body string + ClosedAt *time.Time + Comments int + CommentsURL string + CreatedAt time.Time + EventsURL string + HTMLURL string + ID int + Labels []Label + LabelsURL string + Locked bool + Milestone *Milestone + NodeID string + Number int + PullRequest *PullRequestRef + RepositoryURL string + State string + TimelineURL string + Title string + URL string + UpdatedAt time.Time + User GitHubUser + type GitHubPermissionError struct + func (e *GitHubPermissionError) Error() string + type GitHubPullRequest struct + Additions int + Assignee *GitHubUser + Assignees []GitHubUser + AuthorAssociation string + AutoMerge interface{} + Base PRRef + Body string + ChangedFiles int + ClosedAt *time.Time + Comments int + CommentsURL string + Commits int + CommitsURL string + CreatedAt time.Time + Deletions int + DiffURL string + Draft bool + HTMLURL string + Head PRRef + ID int + IssueURL string + Labels []Label + Locked bool + MaintainerCanModify bool + MergeCommitSHA string + Mergeable bool + MergeableState string + Merged bool + MergedAt *time.Time + Milestone *Milestone + NodeID string + Number int + PatchURL string + Rebaseable bool + RequestedReviewers []GitHubUser + RequestedTeams []Team + ReviewCommentURL string + ReviewComments int + ReviewCommentsURL string + State string + StatusesURL string + Title string + URL string + UpdatedAt time.Time + User GitHubUser + type GitHubRateLimitError struct + ResetAt time.Time + func (e *GitHubRateLimitError) Error() string + type GitHubRepository struct + ArchiveURL string + Archived bool + AssigneesURL string + BlobsURL string + BranchesURL string + CloneURL string + CollaboratorsURL string + CommentsURL string + CommitsURL string + CompareURL string + ContentsURL string + ContributorsURL string + CreatedAt time.Time + DefaultBranch string + DeploymentsURL string + Description string + Disabled bool + DownloadsURL string + EventsURL string + Fork bool + Forks int + ForksCount int + ForksURL string + FullName string + GitCommitsURL string + GitRefsURL string + GitTagsURL string + GitURL string + HTMLURL string + HasDownloads bool + HasIssues bool + HasPages bool + HasProjects bool + HasWiki bool + Homepage string + HooksURL string + ID int + IssueCommentURL string + IssueEventsURL string + IssuesURL string + KeysURL string + LabelsURL string + Language string + LanguagesURL string + License interface{} + MergesURL string + MilestonesURL string + Name string + NodeID string + NotificationsURL string + OpenIssues int + OpenIssuesCount int + Owner GitHubUser + Parent *GitHubRepository + Permissions *Permissions + Private bool + PullsURL string + PushedAt time.Time + ReleasesURL string + SSHURL string + Size int + Source *GitHubRepository + StargazersCount int + StargazersURL string + StatusesURL string + SubscribersURL string + SubscriptionURL string + SvnURL string + TagsURL string + TeamsURL string + TreesURL string + URL string + UpdatedAt time.Time + Watchers int + WatchersCount int + type GitHubResourceNotFoundError struct + func (e *GitHubResourceNotFoundError) Error() string + type GitHubSearchCodeResponse struct + IncompleteResults bool + Items []CodeResult + TotalCount int + type GitHubSearchIssuesResponse struct + IncompleteResults bool + Items []GitHubIssue + TotalCount int + type GitHubSearchResponse struct + IncompleteResults bool + Items []GitHubRepository + TotalCount int + type GitHubSearchUsersResponse struct + IncompleteResults bool + Items []GitHubUser + TotalCount int + type GitHubUser struct + AvatarURL string + Bio string + Blog string + Collaborators int + Company string + CreatedAt string + DiskUsage int + Email string + Followers int + Following int + GravatarID string + HTMLURL string + Hireable bool + ID int + Location string + Login string + Name string + NodeID string + OwnedPrivateRepos int + PrivateGists int + PublicGists int + PublicRepos int + SiteAdmin bool + TotalPrivateRepos int + TwitterUsername string + Type string + UpdatedAt string + type GitHubValidationError struct + func (e *GitHubValidationError) Error() string + type Label struct + Color string + Default bool + Description string + ID int + Name string + NodeID string + URL string + type Milestone struct + ClosedAt *time.Time + ClosedIssues int + CreatedAt time.Time + Creator GitHubUser + Description string + DueOn *time.Time + HTMLURL string + ID int + LabelsURL string + NodeID string + Number int + OpenIssues int + State string + Title string + URL string + UpdatedAt time.Time + type PRRef struct + Label string + Ref string + Repo GitHubRepository + SHA string + User GitHubUser + type Permissions struct + Admin bool + Pull bool + Push bool + type PullRequestRef struct + DiffURL string + HTMLURL string + PatchURL string + URL string + type Team struct + Description string + HTMLURL string + ID int + Name string + NodeID string + Privacy string + Slug string + URL string + type Verification struct + Payload string + Reason string + Signature string + Verified bool