mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 17:54:07 +01:00
Do not store inactive repos (#1658)
Do not sync repos with forge if the repo is not necessary in DB. In the DB, only repos that were active once or repos that are currently active are stored. When trying to enable new repos, the repos list is fetched from the forge instead and displayed directly. In addition to this, the forge func `Perm` was removed and is now merged with `Repo`. Solves a TODO on RepoBatch. --------- Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.0. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -300,32 +300,6 @@ func (_m *Forge) OrgMembership(ctx context.Context, u *model.User, owner string)
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Perm provides a mock function with given fields: ctx, u, r
|
||||
func (_m *Forge) Perm(ctx context.Context, u *model.User, r *model.Repo) (*model.Perm, error) {
|
||||
ret := _m.Called(ctx, u, r)
|
||||
|
||||
var r0 *model.Perm
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.User, *model.Repo) (*model.Perm, error)); ok {
|
||||
return rf(ctx, u, r)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.User, *model.Repo) *model.Perm); ok {
|
||||
r0 = rf(ctx, u, r)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Perm)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *model.User, *model.Repo) error); ok {
|
||||
r1 = rf(ctx, u, r)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PullRequests provides a mock function with given fields: ctx, u, r, p
|
||||
func (_m *Forge) PullRequests(ctx context.Context, u *model.User, r *model.Repo, p *model.PaginationData) ([]*model.PullRequest, error) {
|
||||
ret := _m.Called(ctx, u, r, p)
|
||||
|
||||
Reference in New Issue
Block a user