Skip to content

Commit

Permalink
fix: set the default page to be 1 so that pagination works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Sep 9, 2023
1 parent ea3f153 commit e862168
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/harbor/harbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func New(harbor Harbor) (*Harbor, error) {
}
harbor.ClientV3 = c
harbor.Config = &config.Options{
Page: 1,
PageSize: 100,
}
c2, err := harborclientv5.NewRESTClientForHost(harbor.API, harbor.Username, harbor.Password, harbor.Config)
Expand Down
1 change: 1 addition & 0 deletions internal/harbor/harbor22x.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ func (h *Harbor) CreateOrRefreshRobotV2(ctx context.Context,
robots = tempRobots
for _, robot := range robots {
if h.matchRobotAccountV2(robot.Name, project.Name, environmentName) && robot.Editable {
h.Log.Info(fmt.Sprintf("Harbor robot account %s matched", robot.Name))
// if it is a new robot account, follow through here
exists = true
if forceRecreate || force {
Expand Down

0 comments on commit e862168

Please sign in to comment.