• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / integration-test-runner / 2362986354

04 Mar 2026 09:10AM UTC coverage: 71.748% (+0.8%) from 70.917%
2362986354

Pull #438

gitlab-ci

pasinskim
fix(bot): auto-detect team repos for pr stats by default

Previously, `print pr stats` reported on the single repo where the
command was issued. Team expansion only happened with an explicit
--all-repos flag.

Now team repos are resolved automatically from the current repo via
the config (fast mode for `print pr stats`, slow mode for
`print full pr stats`). Passing --repo or --team still overrides
the auto-detection. --all-repos is kept as a no-op for compatibility.

Signed-off-by: pasinskim <marcin.pasinski@northern.tech>
Pull Request #438: Let the mender-test-bot print PR stats.

525 of 701 new or added lines in 5 files covered. (74.89%)

6 existing lines in 1 file now uncovered.

2405 of 3352 relevant lines covered (71.75%)

2.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/client/github/mocks/Client.go
1
// Code generated by mockery v2.15.0. DO NOT EDIT.
2

3
package mocks
4

5
import (
6
        context "context"
7

8
        mock "github.com/stretchr/testify/mock"
9

10
        v28github "github.com/google/go-github/v28/github"
11
)
12

13
// Client is an autogenerated mock type for the Client type
14
type Client struct {
15
        mock.Mock
16
}
17

18
// AssignPullRequest provides a mock function with given fields: ctx, owner, repo, prNumber, assignees
19
func (_m *Client) AssignPullRequest(ctx context.Context, owner string, repo string, prNumber int, assignees []string) error {
×
20
        ret := _m.Called(ctx, owner, repo, prNumber, assignees)
×
21

×
22
        var r0 error
×
23
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int, []string) error); ok {
×
24
                r0 = rf(ctx, owner, repo, prNumber, assignees)
×
25
        } else {
×
26
                r0 = ret.Error(0)
×
27
        }
×
28

29
        return r0
×
30
}
31

32
// CreateComment provides a mock function with given fields: ctx, org, repo, number, comment
33
func (_m *Client) CreateComment(ctx context.Context, org string, repo string, number int, comment *v28github.IssueComment) error {
×
34
        ret := _m.Called(ctx, org, repo, number, comment)
×
35

×
36
        var r0 error
×
37
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int, *v28github.IssueComment) error); ok {
×
38
                r0 = rf(ctx, org, repo, number, comment)
×
39
        } else {
×
40
                r0 = ret.Error(0)
×
41
        }
×
42

43
        return r0
×
44
}
45

46
// CreatePullRequest provides a mock function with given fields: ctx, org, repo, pr
47
func (_m *Client) CreatePullRequest(ctx context.Context, org string, repo string, pr *v28github.NewPullRequest) (*v28github.PullRequest, error) {
×
48
        ret := _m.Called(ctx, org, repo, pr)
×
49

×
50
        var r0 *v28github.PullRequest
×
51
        if rf, ok := ret.Get(0).(func(context.Context, string, string, *v28github.NewPullRequest) *v28github.PullRequest); ok {
×
52
                r0 = rf(ctx, org, repo, pr)
×
53
        } else {
×
54
                if ret.Get(0) != nil {
×
55
                        r0 = ret.Get(0).(*v28github.PullRequest)
×
56
                }
×
57
        }
58

59
        var r1 error
×
60
        if rf, ok := ret.Get(1).(func(context.Context, string, string, *v28github.NewPullRequest) error); ok {
×
61
                r1 = rf(ctx, org, repo, pr)
×
62
        } else {
×
63
                r1 = ret.Error(1)
×
64
        }
×
65

66
        return r0, r1
×
67
}
68

69
// DeleteComment provides a mock function with given fields: ctx, org, repo, commentID
70
func (_m *Client) DeleteComment(ctx context.Context, org string, repo string, commentID int64) error {
×
71
        ret := _m.Called(ctx, org, repo, commentID)
×
72

×
73
        var r0 error
×
74
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) error); ok {
×
75
                r0 = rf(ctx, org, repo, commentID)
×
76
        } else {
×
77
                r0 = ret.Error(0)
×
78
        }
×
79

80
        return r0
×
81
}
82

83
// GetPullRequest provides a mock function with given fields: ctx, org, repo, pr
84
func (_m *Client) GetPullRequest(ctx context.Context, org string, repo string, pr int) (*v28github.PullRequest, error) {
×
85
        ret := _m.Called(ctx, org, repo, pr)
×
86

×
87
        var r0 *v28github.PullRequest
×
88
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int) *v28github.PullRequest); ok {
×
89
                r0 = rf(ctx, org, repo, pr)
×
90
        } else {
×
91
                if ret.Get(0) != nil {
×
92
                        r0 = ret.Get(0).(*v28github.PullRequest)
×
93
                }
×
94
        }
95

96
        var r1 error
×
97
        if rf, ok := ret.Get(1).(func(context.Context, string, string, int) error); ok {
×
98
                r1 = rf(ctx, org, repo, pr)
×
99
        } else {
×
100
                r1 = ret.Error(1)
×
101
        }
×
102

103
        return r0, r1
×
104
}
105

106
// IsOrganizationMember provides a mock function with given fields: ctx, org, user
107
func (_m *Client) IsOrganizationMember(ctx context.Context, org string, user string) bool {
×
108
        ret := _m.Called(ctx, org, user)
×
109

×
110
        var r0 bool
×
111
        if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
×
112
                r0 = rf(ctx, org, user)
×
113
        } else {
×
114
                r0 = ret.Get(0).(bool)
×
115
        }
×
116

117
        return r0
×
118
}
119

120
// ListComments provides a mock function with given fields: ctx, owner, repo, number, opts
121
func (_m *Client) ListComments(ctx context.Context, owner string, repo string, number int, opts *v28github.IssueListCommentsOptions) ([]*v28github.IssueComment, error) {
×
122
        ret := _m.Called(ctx, owner, repo, number, opts)
×
123

×
124
        var r0 []*v28github.IssueComment
×
125
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int, *v28github.IssueListCommentsOptions) []*v28github.IssueComment); ok {
×
126
                r0 = rf(ctx, owner, repo, number, opts)
×
127
        } else {
×
128
                if ret.Get(0) != nil {
×
129
                        r0 = ret.Get(0).([]*v28github.IssueComment)
×
130
                }
×
131
        }
132

133
        var r1 error
×
134
        if rf, ok := ret.Get(1).(func(context.Context, string, string, int, *v28github.IssueListCommentsOptions) error); ok {
×
135
                r1 = rf(ctx, owner, repo, number, opts)
×
136
        } else {
×
137
                r1 = ret.Error(1)
×
138
        }
×
139

140
        return r0, r1
×
141
}
142

143
// ListPullRequests provides a mock function with given fields: ctx, owner, repo, opts
NEW
144
func (_m *Client) ListPullRequests(ctx context.Context, owner string, repo string, opts *v28github.PullRequestListOptions) ([]*v28github.PullRequest, error) {
×
NEW
145
        ret := _m.Called(ctx, owner, repo, opts)
×
NEW
146

×
NEW
147
        var r0 []*v28github.PullRequest
×
NEW
148
        if rf, ok := ret.Get(0).(func(context.Context, string, string, *v28github.PullRequestListOptions) []*v28github.PullRequest); ok {
×
NEW
149
                r0 = rf(ctx, owner, repo, opts)
×
NEW
150
        } else {
×
NEW
151
                if ret.Get(0) != nil {
×
NEW
152
                        r0 = ret.Get(0).([]*v28github.PullRequest)
×
NEW
153
                }
×
154
        }
155

NEW
156
        var r1 error
×
NEW
157
        if rf, ok := ret.Get(1).(func(context.Context, string, string, *v28github.PullRequestListOptions) error); ok {
×
NEW
158
                r1 = rf(ctx, owner, repo, opts)
×
NEW
159
        } else {
×
NEW
160
                r1 = ret.Error(1)
×
NEW
161
        }
×
162

NEW
163
        return r0, r1
×
164
}
165

166
// ListReviews provides a mock function with given fields: ctx, owner, repo, number, opts
NEW
167
func (_m *Client) ListReviews(ctx context.Context, owner string, repo string, number int, opts *v28github.ListOptions) ([]*v28github.PullRequestReview, error) {
×
NEW
168
        ret := _m.Called(ctx, owner, repo, number, opts)
×
NEW
169

×
NEW
170
        var r0 []*v28github.PullRequestReview
×
NEW
171
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int, *v28github.ListOptions) []*v28github.PullRequestReview); ok {
×
NEW
172
                r0 = rf(ctx, owner, repo, number, opts)
×
NEW
173
        } else {
×
NEW
174
                if ret.Get(0) != nil {
×
NEW
175
                        r0 = ret.Get(0).([]*v28github.PullRequestReview)
×
NEW
176
                }
×
177
        }
178

NEW
179
        var r1 error
×
NEW
180
        if rf, ok := ret.Get(1).(func(context.Context, string, string, int, *v28github.ListOptions) error); ok {
×
NEW
181
                r1 = rf(ctx, owner, repo, number, opts)
×
NEW
182
        } else {
×
NEW
183
                r1 = ret.Error(1)
×
NEW
184
        }
×
185

NEW
186
        return r0, r1
×
187
}
188

189
// ListTimeline provides a mock function with given fields: ctx, owner, repo, number, opts
NEW
190
func (_m *Client) ListTimeline(ctx context.Context, owner string, repo string, number int, opts *v28github.ListOptions) ([]*v28github.Timeline, error) {
×
NEW
191
        ret := _m.Called(ctx, owner, repo, number, opts)
×
NEW
192

×
NEW
193
        var r0 []*v28github.Timeline
×
NEW
194
        if rf, ok := ret.Get(0).(func(context.Context, string, string, int, *v28github.ListOptions) []*v28github.Timeline); ok {
×
NEW
195
                r0 = rf(ctx, owner, repo, number, opts)
×
NEW
196
        } else {
×
NEW
197
                if ret.Get(0) != nil {
×
NEW
198
                        r0 = ret.Get(0).([]*v28github.Timeline)
×
NEW
199
                }
×
200
        }
201

NEW
202
        var r1 error
×
NEW
203
        if rf, ok := ret.Get(1).(func(context.Context, string, string, int, *v28github.ListOptions) error); ok {
×
NEW
204
                r1 = rf(ctx, owner, repo, number, opts)
×
NEW
205
        } else {
×
NEW
206
                r1 = ret.Error(1)
×
NEW
207
        }
×
208

NEW
209
        return r0, r1
×
210
}
211

212
type mockConstructorTestingTNewClient interface {
213
        mock.TestingT
214
        Cleanup(func())
215
}
216

217
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
218
func NewClient(t mockConstructorTestingTNewClient) *Client {
×
219
        mock := &Client{}
×
220
        mock.Mock.Test(t)
×
221

×
222
        t.Cleanup(func() { mock.AssertExpectations(t) })
×
223

224
        return mock
×
225
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc