-
-
Notifications
You must be signed in to change notification settings - Fork 374
Expand file tree
/
Copy pathgithub.go
More file actions
54 lines (45 loc) · 1.84 KB
/
github.go
File metadata and controls
54 lines (45 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package provider
// GitHubProvider implements the Provider interface for GitHub
// GitHub uses the gh CLI and the existing data package functions
type GitHubProvider struct {
host string
}
// NewGitHubProvider creates a new GitHub provider
func NewGitHubProvider() *GitHubProvider {
return &GitHubProvider{
host: "github.com",
}
}
func (g *GitHubProvider) GetType() ProviderType {
return GitHub
}
func (g *GitHubProvider) GetHost() string {
return g.host
}
func (g *GitHubProvider) GetCLICommand() string {
return "gh"
}
// FetchPullRequests is not implemented for GitHub provider
// The data package handles GitHub directly
func (g *GitHubProvider) FetchPullRequests(query string, limit int, pageInfo *PageInfo) (PullRequestsResponse, error) {
// This should not be called - data package handles GitHub directly
panic("GitHubProvider.FetchPullRequests should not be called directly")
}
// FetchPullRequest is not implemented for GitHub provider
// The data package handles GitHub directly
func (g *GitHubProvider) FetchPullRequest(prUrl string) (EnrichedPullRequestData, error) {
// This should not be called - data package handles GitHub directly
panic("GitHubProvider.FetchPullRequest should not be called directly")
}
// FetchIssues is not implemented for GitHub provider
// The data package handles GitHub directly
func (g *GitHubProvider) FetchIssues(query string, limit int, pageInfo *PageInfo) (IssuesResponse, error) {
// This should not be called - data package handles GitHub directly
panic("GitHubProvider.FetchIssues should not be called directly")
}
// GetCurrentUser is not implemented for GitHub provider
// The data package handles GitHub directly
func (g *GitHubProvider) GetCurrentUser() (string, error) {
// This should not be called - data package handles GitHub directly
panic("GitHubProvider.GetCurrentUser should not be called directly")
}