Implements three new endpoints for managing repository hidden folders:
- GET /repos/{owner}/{repo}/hidden-folders - list all hidden folders
- PUT /repos/{owner}/{repo}/hidden-folders - add a hidden folder
- DELETE /repos/{owner}/{repo}/hidden-folders - remove a hidden folder
All write operations require repository admin permissions.
21 lines
578 B
Go
21 lines
578 B
Go
// Copyright 2026 MarketAlly. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package structs
|
|
|
|
// HiddenFolderV2 represents a hidden folder in a repository.
|
|
type HiddenFolderV2 struct {
|
|
Path string `json:"path"`
|
|
CreatedAt int64 `json:"created_at"`
|
|
}
|
|
|
|
// HiddenFolderListV2 is the response for listing hidden folders.
|
|
type HiddenFolderListV2 struct {
|
|
Folders []*HiddenFolderV2 `json:"folders"`
|
|
}
|
|
|
|
// HiddenFolderOptionV2 is the request body for adding or removing a hidden folder.
|
|
type HiddenFolderOptionV2 struct {
|
|
Path string `json:"path" binding:"Required"`
|
|
}
|