v0.21.0 ef38ad0

CIGit.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"bnema.dev/ermite/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewCIGit creates a new instance of CIGit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewCIGit(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *CIGit {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &CIGit{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// CIGit is an autogenerated mock type for the CIGit type
38type CIGit struct {
39	mock.Mock
40}
41
42type CIGit_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *CIGit) EXPECT() *CIGit_Expecter {
47	return &CIGit_Expecter{mock: &_m.Mock}
48}
49
50// ChangedPaths provides a mock function for the type CIGit
51func (_mock *CIGit) ChangedPaths(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int) ([]string, bool, error) {
52	ret := _mock.Called(ctx, repo, base, head, max)
53
54	if len(ret) == 0 {
55		panic("no return value specified for ChangedPaths")
56	}
57
58	var r0 []string
59	var r1 bool
60	var r2 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) ([]string, bool, error)); ok {
62		return returnFunc(ctx, repo, base, head, max)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) []string); ok {
65		r0 = returnFunc(ctx, repo, base, head, max)
66	} else {
67		if ret.Get(0) != nil {
68			r0 = ret.Get(0).([]string)
69		}
70	}
71	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) bool); ok {
72		r1 = returnFunc(ctx, repo, base, head, max)
73	} else {
74		r1 = ret.Get(1).(bool)
75	}
76	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok {
77		r2 = returnFunc(ctx, repo, base, head, max)
78	} else {
79		r2 = ret.Error(2)
80	}
81	return r0, r1, r2
82}
83
84// CIGit_ChangedPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangedPaths'
85type CIGit_ChangedPaths_Call struct {
86	*mock.Call
87}
88
89// ChangedPaths is a helper method to define mock.On call
90//   - ctx context.Context
91//   - repo domain.RepoName
92//   - base domain.ObjectID
93//   - head domain.ObjectID
94//   - max int
95func (_e *CIGit_Expecter) ChangedPaths(ctx any, repo any, base any, head any, max any) *CIGit_ChangedPaths_Call {
96	return &CIGit_ChangedPaths_Call{Call: _e.mock.On("ChangedPaths", ctx, repo, base, head, max)}
97}
98
99func (_c *CIGit_ChangedPaths_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int)) *CIGit_ChangedPaths_Call {
100	_c.Call.Run(func(args mock.Arguments) {
101		var arg0 context.Context
102		if args[0] != nil {
103			arg0 = args[0].(context.Context)
104		}
105		var arg1 domain.RepoName
106		if args[1] != nil {
107			arg1 = args[1].(domain.RepoName)
108		}
109		var arg2 domain.ObjectID
110		if args[2] != nil {
111			arg2 = args[2].(domain.ObjectID)
112		}
113		var arg3 domain.ObjectID
114		if args[3] != nil {
115			arg3 = args[3].(domain.ObjectID)
116		}
117		var arg4 int
118		if args[4] != nil {
119			arg4 = args[4].(int)
120		}
121		run(
122			arg0,
123			arg1,
124			arg2,
125			arg3,
126			arg4,
127		)
128	})
129	return _c
130}
131
132func (_c *CIGit_ChangedPaths_Call) Return(paths []string, truncated bool, err error) *CIGit_ChangedPaths_Call {
133	_c.Call.Return(paths, truncated, err)
134	return _c
135}
136
137func (_c *CIGit_ChangedPaths_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int) ([]string, bool, error)) *CIGit_ChangedPaths_Call {
138	_c.Call.Return(run)
139	return _c
140}
141
142// CommitsOffBranches provides a mock function for the type CIGit
143func (_mock *CIGit) CommitsOffBranches(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int) ([]domain.Commit, bool, error) {
144	ret := _mock.Called(ctx, repo, head, limit)
145
146	if len(ret) == 0 {
147		panic("no return value specified for CommitsOffBranches")
148	}
149
150	var r0 []domain.Commit
151	var r1 bool
152	var r2 error
153	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, int) ([]domain.Commit, bool, error)); ok {
154		return returnFunc(ctx, repo, head, limit)
155	}
156	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, int) []domain.Commit); ok {
157		r0 = returnFunc(ctx, repo, head, limit)
158	} else {
159		if ret.Get(0) != nil {
160			r0 = ret.Get(0).([]domain.Commit)
161		}
162	}
163	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, int) bool); ok {
164		r1 = returnFunc(ctx, repo, head, limit)
165	} else {
166		r1 = ret.Get(1).(bool)
167	}
168	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, int) error); ok {
169		r2 = returnFunc(ctx, repo, head, limit)
170	} else {
171		r2 = ret.Error(2)
172	}
173	return r0, r1, r2
174}
175
176// CIGit_CommitsOffBranches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitsOffBranches'
177type CIGit_CommitsOffBranches_Call struct {
178	*mock.Call
179}
180
181// CommitsOffBranches is a helper method to define mock.On call
182//   - ctx context.Context
183//   - repo domain.RepoName
184//   - head domain.ObjectID
185//   - limit int
186func (_e *CIGit_Expecter) CommitsOffBranches(ctx any, repo any, head any, limit any) *CIGit_CommitsOffBranches_Call {
187	return &CIGit_CommitsOffBranches_Call{Call: _e.mock.On("CommitsOffBranches", ctx, repo, head, limit)}
188}
189
190func (_c *CIGit_CommitsOffBranches_Call) Run(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int)) *CIGit_CommitsOffBranches_Call {
191	_c.Call.Run(func(args mock.Arguments) {
192		var arg0 context.Context
193		if args[0] != nil {
194			arg0 = args[0].(context.Context)
195		}
196		var arg1 domain.RepoName
197		if args[1] != nil {
198			arg1 = args[1].(domain.RepoName)
199		}
200		var arg2 domain.ObjectID
201		if args[2] != nil {
202			arg2 = args[2].(domain.ObjectID)
203		}
204		var arg3 int
205		if args[3] != nil {
206			arg3 = args[3].(int)
207		}
208		run(
209			arg0,
210			arg1,
211			arg2,
212			arg3,
213		)
214	})
215	return _c
216}
217
218func (_c *CIGit_CommitsOffBranches_Call) Return(commits []domain.Commit, more bool, err error) *CIGit_CommitsOffBranches_Call {
219	_c.Call.Return(commits, more, err)
220	return _c
221}
222
223func (_c *CIGit_CommitsOffBranches_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int) ([]domain.Commit, bool, error)) *CIGit_CommitsOffBranches_Call {
224	_c.Call.Return(run)
225	return _c
226}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 45

↑↓ moveenter openesc close