-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub.go
143 lines (123 loc) · 5.07 KB
/
github.go
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Code generated by MockGen. DO NOT EDIT.
// Source: github.go
//
// Generated by this command:
//
// mockgen -source=github.go -destination=../../mock/github.go
//
// Package mock_service is a generated GoMock package.
package mock_service
import (
reflect "reflect"
entity "github.com/cocoide/commitify/internal/entity"
service "github.com/cocoide/commitify/internal/service"
"github.com/golang/mock/gomock"
)
// MockGithubService is a mock of GithubService interface.
type MockGithubService struct {
ctrl *gomock.Controller
recorder *MockGithubServiceMockRecorder
}
// MockGithubServiceMockRecorder is the mock recorder for MockGithubService.
type MockGithubServiceMockRecorder struct {
mock *MockGithubService
}
// NewMockGithubService creates a new mock instance.
func NewMockGithubService(ctrl *gomock.Controller) *MockGithubService {
mock := &MockGithubService{ctrl: ctrl}
mock.recorder = &MockGithubServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGithubService) EXPECT() *MockGithubServiceMockRecorder {
return m.recorder
}
// CreatePullRequest mocks base method.
func (m *MockGithubService) CreatePullRequest(pr *entity.PullRequest, token string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreatePullRequest", pr, token)
ret0, _ := ret[0].(error)
return ret0
}
// CreatePullRequest indicates an expected call of CreatePullRequest.
func (mr *MockGithubServiceMockRecorder) CreatePullRequest(pr, token any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePullRequest", reflect.TypeOf((*MockGithubService)(nil).CreatePullRequest), pr, token)
}
// GetCurrentBranch mocks base method.
func (m *MockGithubService) GetCurrentBranch() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentBranch")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCurrentBranch indicates an expected call of GetCurrentBranch.
func (mr *MockGithubServiceMockRecorder) GetCurrentBranch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentBranch", reflect.TypeOf((*MockGithubService)(nil).GetCurrentBranch))
}
// GetCurrentRepoDetails mocks base method.
func (m *MockGithubService) GetCurrentRepoDetails() (*service.GetRepoDetailsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentRepoDetails")
ret0, _ := ret[0].(*service.GetRepoDetailsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCurrentRepoDetails indicates an expected call of GetCurrentRepoDetails.
func (mr *MockGithubServiceMockRecorder) GetCurrentRepoDetails() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentRepoDetails", reflect.TypeOf((*MockGithubService)(nil).GetCurrentRepoDetails))
}
// GetRecentUpdatedBranch mocks base method.
func (m *MockGithubService) GetRecentUpdatedBranch() ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRecentUpdatedBranch")
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRecentUpdatedBranch indicates an expected call of GetRecentUpdatedBranch.
func (mr *MockGithubServiceMockRecorder) GetRecentUpdatedBranch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRecentUpdatedBranch", reflect.TypeOf((*MockGithubService)(nil).GetRecentUpdatedBranch))
}
// GetStagingCodeDiff mocks base method.
func (m *MockGithubService) GetStagingCodeDiff() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStagingCodeDiff")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetStagingCodeDiff indicates an expected call of GetStagingCodeDiff.
func (mr *MockGithubServiceMockRecorder) GetStagingCodeDiff() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStagingCodeDiff", reflect.TypeOf((*MockGithubService)(nil).GetStagingCodeDiff))
}
// GetUnPushedCommits mocks base method.
func (m *MockGithubService) GetUnPushedCommits(base string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUnPushedCommits", base)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetUnPushedCommits indicates an expected call of GetUnPushedCommits.
func (mr *MockGithubServiceMockRecorder) GetUnPushedCommits(base any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnPushedCommits", reflect.TypeOf((*MockGithubService)(nil).GetUnPushedCommits), base)
}
// PushCurrentBranch mocks base method.
func (m *MockGithubService) PushCurrentBranch() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushCurrentBranch")
ret0, _ := ret[0].(error)
return ret0
}
// PushCurrentBranch indicates an expected call of PushCurrentBranch.
func (mr *MockGithubServiceMockRecorder) PushCurrentBranch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushCurrentBranch", reflect.TypeOf((*MockGithubService)(nil).PushCurrentBranch))
}