mirror of
https://github.com/harness/drone.git
synced 2025-05-04 08:49:52 +08:00

This change adds the following to the list branches api: - 'query' parameter for querying branches using arbitrary substrings - 'sort' parameter for sorting the branches (name and date supported) - 'direction' parameter for specifing the direction of the sorted output
23 lines
675 B
Go
23 lines
675 B
Go
// Copyright 2022 Harness Inc. All rights reserved.
|
|
// Use of this source code is governed by the Polyform Free Trial License
|
|
// that can be found in the LICENSE.md file for this repository.
|
|
|
|
package types
|
|
|
|
import "github.com/harness/gitness/types/enum"
|
|
|
|
// CommitFilter stores commit query parameters.
|
|
type CommitFilter struct {
|
|
Page int `json:"page"`
|
|
Size int `json:"size"`
|
|
}
|
|
|
|
// BranchFilter stores commit query parameters.
|
|
type BranchFilter struct {
|
|
Query string `json:"query"`
|
|
Sort enum.BranchSortOption `json:"sort"`
|
|
Order enum.Order `json:"order"`
|
|
Page int `json:"page"`
|
|
Size int `json:"size"`
|
|
}
|