wip
This commit is contained in:
@ -2,12 +2,13 @@ package gitlab
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/xanzy/go-gitlab"
|
||||
)
|
||||
|
||||
const defProjectsPerPage = 100
|
||||
const defProjectsPerPage = 30
|
||||
|
||||
type Client struct {
|
||||
Ctx context.Context
|
||||
@ -15,12 +16,11 @@ type Client struct {
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
ID int
|
||||
Description string
|
||||
SSHURLToRepo string
|
||||
HTTPURLToRepo string
|
||||
WebURL string
|
||||
// Owner User
|
||||
ID int
|
||||
Description string
|
||||
SSHURLToRepo string
|
||||
HTTPURLToRepo string
|
||||
WebURL string
|
||||
Name string
|
||||
NameWithNamespace string
|
||||
Path string
|
||||
@ -51,6 +51,10 @@ type Progress struct {
|
||||
TotalProjects int
|
||||
}
|
||||
|
||||
func (p *Project) String() string {
|
||||
return fmt.Sprintf("%s (%s)", p.Path, p.PathWithNamespace)
|
||||
}
|
||||
|
||||
// Given there may be thousands of projects, this will return
|
||||
// channels that stream progress info and then finally the full
|
||||
// list of projects on separate channels
|
||||
@ -77,6 +81,7 @@ func (c *Client) streamProjects(pi *ProgressInfo) {
|
||||
Page: 1,
|
||||
},
|
||||
Archived: new(bool),
|
||||
Owned: gitlab.Ptr[bool](true),
|
||||
}
|
||||
|
||||
var numProjects int
|
||||
|
Reference in New Issue
Block a user