-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_github.go
166 lines (141 loc) · 6.87 KB
/
mock_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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by MockGen. DO NOT EDIT.
// Source: github.go
package main
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockGithubClient is a mock of GithubClient interface.
type MockGithubClient struct {
ctrl *gomock.Controller
recorder *MockGithubClientMockRecorder
}
// MockGithubClientMockRecorder is the mock recorder for MockGithubClient.
type MockGithubClientMockRecorder struct {
mock *MockGithubClient
}
// NewMockGithubClient creates a new mock instance.
func NewMockGithubClient(ctrl *gomock.Controller) *MockGithubClient {
mock := &MockGithubClient{ctrl: ctrl}
mock.recorder = &MockGithubClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGithubClient) EXPECT() *MockGithubClientMockRecorder {
return m.recorder
}
// CompareCommits mocks base method.
func (m *MockGithubClient) CompareCommits(ctx context.Context, owner, repo, base, head string, count int) (*CommitComparison, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CompareCommits", ctx, owner, repo, base, head, count)
ret0, _ := ret[0].(*CommitComparison)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CompareCommits indicates an expected call of CompareCommits.
func (mr *MockGithubClientMockRecorder) CompareCommits(ctx, owner, repo, base, head, count interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompareCommits", reflect.TypeOf((*MockGithubClient)(nil).CompareCommits), ctx, owner, repo, base, head, count)
}
// CreateRelease mocks base method.
func (m *MockGithubClient) CreateRelease(ctx context.Context, owner, repo, tag, body string, prerelease bool) (*RepoRelease, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateRelease", ctx, owner, repo, tag, body, prerelease)
ret0, _ := ret[0].(*RepoRelease)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateRelease indicates an expected call of CreateRelease.
func (mr *MockGithubClientMockRecorder) CreateRelease(ctx, owner, repo, tag, body, prerelease interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRelease", reflect.TypeOf((*MockGithubClient)(nil).CreateRelease), ctx, owner, repo, tag, body, prerelease)
}
// DeleteRelease mocks base method.
func (m *MockGithubClient) DeleteRelease(ctx context.Context, owner, repo string, id int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteRelease", ctx, owner, repo, id)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteRelease indicates an expected call of DeleteRelease.
func (mr *MockGithubClientMockRecorder) DeleteRelease(ctx, owner, repo, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRelease", reflect.TypeOf((*MockGithubClient)(nil).DeleteRelease), ctx, owner, repo, id)
}
// GenerateReleaseNotes mocks base method.
func (m *MockGithubClient) GenerateReleaseNotes(ctx context.Context, owner, repo, tag, prevTag string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GenerateReleaseNotes", ctx, owner, repo, tag, prevTag)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GenerateReleaseNotes indicates an expected call of GenerateReleaseNotes.
func (mr *MockGithubClientMockRecorder) GenerateReleaseNotes(ctx, owner, repo, tag, prevTag interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateReleaseNotes", reflect.TypeOf((*MockGithubClient)(nil).GenerateReleaseNotes), ctx, owner, repo, tag, prevTag)
}
// GetPullRequest mocks base method.
func (m *MockGithubClient) GetPullRequest(ctx context.Context, owner, repo string, number int) (*BasePull, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPullRequest", ctx, owner, repo, number)
ret0, _ := ret[0].(*BasePull)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPullRequest indicates an expected call of GetPullRequest.
func (mr *MockGithubClientMockRecorder) GetPullRequest(ctx, owner, repo, number interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPullRequest", reflect.TypeOf((*MockGithubClient)(nil).GetPullRequest), ctx, owner, repo, number)
}
// GetPullRequestCommits mocks base method.
func (m *MockGithubClient) GetPullRequestCommits(ctx context.Context, owner, repo string, number int) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPullRequestCommits", ctx, owner, repo, number)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPullRequestCommits indicates an expected call of GetPullRequestCommits.
func (mr *MockGithubClientMockRecorder) GetPullRequestCommits(ctx, owner, repo, number interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPullRequestCommits", reflect.TypeOf((*MockGithubClient)(nil).GetPullRequestCommits), ctx, owner, repo, number)
}
// ListMergedPullsForCommit mocks base method.
func (m *MockGithubClient) ListMergedPullsForCommit(ctx context.Context, owner, repo, sha string) ([]BasePull, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListMergedPullsForCommit", ctx, owner, repo, sha)
ret0, _ := ret[0].([]BasePull)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListMergedPullsForCommit indicates an expected call of ListMergedPullsForCommit.
func (mr *MockGithubClientMockRecorder) ListMergedPullsForCommit(ctx, owner, repo, sha interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMergedPullsForCommit", reflect.TypeOf((*MockGithubClient)(nil).ListMergedPullsForCommit), ctx, owner, repo, sha)
}
// PublishRelease mocks base method.
func (m *MockGithubClient) PublishRelease(ctx context.Context, owner, repo string, id int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishRelease", ctx, owner, repo, id)
ret0, _ := ret[0].(error)
return ret0
}
// PublishRelease indicates an expected call of PublishRelease.
func (mr *MockGithubClientMockRecorder) PublishRelease(ctx, owner, repo, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishRelease", reflect.TypeOf((*MockGithubClient)(nil).PublishRelease), ctx, owner, repo, id)
}
// UploadAsset mocks base method.
func (m *MockGithubClient) UploadAsset(ctx context.Context, uploadURL, filename string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UploadAsset", ctx, uploadURL, filename)
ret0, _ := ret[0].(error)
return ret0
}
// UploadAsset indicates an expected call of UploadAsset.
func (mr *MockGithubClientMockRecorder) UploadAsset(ctx, uploadURL, filename interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadAsset", reflect.TypeOf((*MockGithubClient)(nil).UploadAsset), ctx, uploadURL, filename)
}