mirror of
https://github.com/go-gitea/gitea
synced 2025-08-13 13:08:19 +00:00
Add has_code
to repository REST API (#35214)
similar to how we can enable/disable repos or issues on a repo add the code unit as option to it. affects ``` PATCH /repos/{owner}/{repo} ``` --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@@ -84,6 +84,7 @@ type Repository struct {
|
||||
Updated time.Time `json:"updated_at"`
|
||||
ArchivedAt time.Time `json:"archived_at"`
|
||||
Permissions *Permission `json:"permissions,omitempty"`
|
||||
HasCode bool `json:"has_code"`
|
||||
HasIssues bool `json:"has_issues"`
|
||||
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
|
||||
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
|
||||
@@ -170,6 +171,8 @@ type EditRepoOption struct {
|
||||
Private *bool `json:"private,omitempty"`
|
||||
// either `true` to make this repository a template or `false` to make it a normal repository
|
||||
Template *bool `json:"template,omitempty"`
|
||||
// either `true` to enable code for this repository or `false` to disable it.
|
||||
HasCode *bool `json:"has_code,omitempty"`
|
||||
// either `true` to enable issues for this repository or `false` to disable them.
|
||||
HasIssues *bool `json:"has_issues,omitempty"`
|
||||
// set this structure to configure internal issue tracker
|
||||
|
Reference in New Issue
Block a user