diff options
author | James Cleverley-Prance <jpts@users.noreply.github.com> | 2023-03-16 17:30:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 12:30:42 -0500 |
commit | 574d8fe6d6675c8aa05e2b75fdbc01c009efd8be (patch) | |
tree | 4133aa64d1554bc68bfaba65bbfa591a462897ae /modules | |
parent | 8d9f8e10b10bf7c19c1609072a8cb144176ee01b (diff) | |
download | gitea-574d8fe6d6675c8aa05e2b75fdbc01c009efd8be.tar.gz gitea-574d8fe6d6675c8aa05e2b75fdbc01c009efd8be.zip |
Add absent repounits to create/edit repo API (#23500)
Adds the ability to enable/disable Actions, Packages and Releases from
the API, via the Edit and Get Repository API endpoints.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/structs/repo.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index b5a26a8155..6d3e2c2909 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -88,6 +88,9 @@ type Repository struct { ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"` HasPullRequests bool `json:"has_pull_requests"` HasProjects bool `json:"has_projects"` + HasReleases bool `json:"has_releases"` + HasPackages bool `json:"has_packages"` + HasActions bool `json:"has_actions"` IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"` AllowMerge bool `json:"allow_merge_commits"` AllowRebase bool `json:"allow_rebase"` @@ -168,6 +171,12 @@ type EditRepoOption struct { HasPullRequests *bool `json:"has_pull_requests,omitempty"` // either `true` to enable project unit, or `false` to disable them. HasProjects *bool `json:"has_projects,omitempty"` + // either `true` to enable releases unit, or `false` to disable them. + HasReleases *bool `json:"has_releases,omitempty"` + // either `true` to enable packages unit, or `false` to disable them. + HasPackages *bool `json:"has_packages,omitempty"` + // either `true` to enable actions unit, or `false` to disable them. + HasActions *bool `json:"has_actions,omitempty"` // either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. IgnoreWhitespaceConflicts *bool `json:"ignore_whitespace_conflicts,omitempty"` // either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. |