diff options
author | Bian Jiaping <ssbianjp@gmail.com> | 2022-07-15 16:00:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 16:00:01 +0800 |
commit | e49ef56dde11e87ec5d43a001dfe59c57b21441c (patch) | |
tree | a607f0a9b8a0e2bf17dacb3ce7083d4fc629f58b /modules/structs | |
parent | edd945bca386929a0d0e5cfbc5fe1b225d64dd71 (diff) | |
download | gitea-e49ef56dde11e87ec5d43a001dfe59c57b21441c.tar.gz gitea-e49ef56dde11e87ec5d43a001dfe59c57b21441c.zip |
Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)
`PATCH /repos/{owner}/{repo}` API allows users to update `allow_rebase_update`, `default_delete_branch_after_merge`, but `GET /repos/{owner}/{repo}` API does not return these two options, and API users has no other ways to find the state of these two options.
This PR add `allow_rebase_update`, `default_delete_branch_after_merge` to repository query api response.
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/repo.go | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index ef247ebc9c..6a5736898d 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -77,24 +77,26 @@ type Repository struct { // swagger:strfmt date-time Created time.Time `json:"created_at"` // swagger:strfmt date-time - Updated time.Time `json:"updated_at"` - Permissions *Permission `json:"permissions,omitempty"` - HasIssues bool `json:"has_issues"` - InternalTracker *InternalTracker `json:"internal_tracker,omitempty"` - ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"` - HasWiki bool `json:"has_wiki"` - ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"` - HasPullRequests bool `json:"has_pull_requests"` - HasProjects bool `json:"has_projects"` - IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"` - AllowMerge bool `json:"allow_merge_commits"` - AllowRebase bool `json:"allow_rebase"` - AllowRebaseMerge bool `json:"allow_rebase_explicit"` - AllowSquash bool `json:"allow_squash_merge"` - DefaultMergeStyle string `json:"default_merge_style"` - AvatarURL string `json:"avatar_url"` - Internal bool `json:"internal"` - MirrorInterval string `json:"mirror_interval"` + Updated time.Time `json:"updated_at"` + Permissions *Permission `json:"permissions,omitempty"` + HasIssues bool `json:"has_issues"` + InternalTracker *InternalTracker `json:"internal_tracker,omitempty"` + ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"` + HasWiki bool `json:"has_wiki"` + ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"` + HasPullRequests bool `json:"has_pull_requests"` + HasProjects bool `json:"has_projects"` + IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"` + AllowMerge bool `json:"allow_merge_commits"` + AllowRebase bool `json:"allow_rebase"` + AllowRebaseMerge bool `json:"allow_rebase_explicit"` + AllowSquash bool `json:"allow_squash_merge"` + AllowRebaseUpdate bool `json:"allow_rebase_update"` + DefaultDeleteBranchAfterMerge bool `json:"default_delete_branch_after_merge"` + DefaultMergeStyle string `json:"default_merge_style"` + AvatarURL string `json:"avatar_url"` + Internal bool `json:"internal"` + MirrorInterval string `json:"mirror_interval"` // swagger:strfmt date-time MirrorUpdated time.Time `json:"mirror_updated,omitempty"` RepoTransfer *RepoTransfer `json:"repo_transfer"` |