mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-19 17:13:44 +08:00
remove option from api
This commit is contained in:
parent
2994945eb4
commit
86b10061f4
|
@ -95,7 +95,6 @@ type Repository struct {
|
|||
HasPackages bool `json:"has_packages"`
|
||||
HasActions bool `json:"has_actions"`
|
||||
IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"`
|
||||
ShowDependencies bool `json:"show_dependencies"`
|
||||
AllowMerge bool `json:"allow_merge_commits"`
|
||||
AllowRebase bool `json:"allow_rebase"`
|
||||
AllowRebaseMerge bool `json:"allow_rebase_explicit"`
|
||||
|
@ -192,8 +191,6 @@ type EditRepoOption struct {
|
|||
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 show `depends on` and `blocks` in Pull Request list, or `false` to not show them.
|
||||
ShowDependencies *bool `json:"show_dependencies,omitempty"`
|
||||
// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
|
||||
AllowMerge *bool `json:"allow_merge_commits,omitempty"`
|
||||
// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
|
||||
|
|
|
@ -881,7 +881,6 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
|||
// Unit type doesn't exist so we make a new config file with default values
|
||||
config = &repo_model.PullRequestsConfig{
|
||||
IgnoreWhitespaceConflicts: false,
|
||||
ShowDependencies: false,
|
||||
AllowMerge: true,
|
||||
AllowRebase: true,
|
||||
AllowRebaseMerge: true,
|
||||
|
@ -901,9 +900,6 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
|||
if opts.IgnoreWhitespaceConflicts != nil {
|
||||
config.IgnoreWhitespaceConflicts = *opts.IgnoreWhitespaceConflicts
|
||||
}
|
||||
if opts.ShowDependencies != nil {
|
||||
config.ShowDependencies = *opts.ShowDependencies
|
||||
}
|
||||
if opts.AllowMerge != nil {
|
||||
config.AllowMerge = *opts.AllowMerge
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
|||
}
|
||||
hasPullRequests := false
|
||||
ignoreWhitespaceConflicts := false
|
||||
showDependencies := false
|
||||
allowMerge := false
|
||||
allowRebase := false
|
||||
allowRebaseMerge := false
|
||||
|
@ -103,7 +102,6 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
|||
config := unit.PullRequestsConfig()
|
||||
hasPullRequests = true
|
||||
ignoreWhitespaceConflicts = config.IgnoreWhitespaceConflicts
|
||||
showDependencies = config.ShowDependencies
|
||||
allowMerge = config.AllowMerge
|
||||
allowRebase = config.AllowRebase
|
||||
allowRebaseMerge = config.AllowRebaseMerge
|
||||
|
@ -223,7 +221,6 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
|||
ExternalWiki: externalWiki,
|
||||
HasPullRequests: hasPullRequests,
|
||||
IgnoreWhitespaceConflicts: ignoreWhitespaceConflicts,
|
||||
ShowDependencies: showDependencies,
|
||||
AllowMerge: allowMerge,
|
||||
AllowRebase: allowRebase,
|
||||
AllowRebaseMerge: allowRebaseMerge,
|
||||
|
|
14
templates/swagger/v1_json.tmpl
generated
14
templates/swagger/v1_json.tmpl
generated
|
@ -19853,16 +19853,6 @@
|
|||
"type": "boolean",
|
||||
"x-go-name": "Private"
|
||||
},
|
||||
"projects_mode": {
|
||||
"description": "`repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both.",
|
||||
"type": "string",
|
||||
"x-go-name": "ProjectsMode"
|
||||
},
|
||||
"show_dependencies": {
|
||||
"description": "either `true` to show `depends on` and `blocks` in Pull Request list, or `false` to not show them.",
|
||||
"type": "boolean",
|
||||
"x-go-name": "ShowDependencies"
|
||||
},
|
||||
"template": {
|
||||
"description": "either `true` to make this repository a template or `false` to make it a normal repository",
|
||||
"type": "boolean",
|
||||
|
@ -22796,10 +22786,6 @@
|
|||
"repo_transfer": {
|
||||
"$ref": "#/definitions/RepoTransfer"
|
||||
},
|
||||
"show_dependencies": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "ShowDependencies"
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
|
|
Loading…
Reference in New Issue
Block a user