This PR would presumably
Fix#20522Fix#18773Fix#19069Fix#21077Fix#13622
-----
1. Check whether unit type is currently enabled
2. Check if it _will_ be enabled via opt
3. Allow modification as necessary
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.
// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.
// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
AllowRebase*bool`json:"allow_rebase,omitempty"`
AllowRebase*bool`json:"allow_rebase,omitempty"`
// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.
// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.
"description": "either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`.",
"description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowManualMerge"
"x-go-name": "AllowManualMerge"
},
},
"allow_merge_commits": {
"allow_merge_commits": {
"description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
"description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowMerge"
"x-go-name": "AllowMerge"
},
},
"allow_rebase": {
"allow_rebase": {
"description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
"description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowRebase"
"x-go-name": "AllowRebase"
},
},
"allow_rebase_explicit": {
"allow_rebase_explicit": {
"description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.",
"description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowRebaseMerge"
"x-go-name": "AllowRebaseMerge"
},
},
"allow_rebase_update": {
"allow_rebase_update": {
"description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it. `has_pull_requests` must be `true`.",
"description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowRebaseUpdate"
"x-go-name": "AllowRebaseUpdate"
},
},
"allow_squash_merge": {
"allow_squash_merge": {
"description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
"description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AllowSquash"
"x-go-name": "AllowSquash"
},
},
@ -15604,7 +15604,7 @@
"x-go-name": "Archived"
"x-go-name": "Archived"
},
},
"autodetect_manual_merge": {
"autodetect_manual_merge": {
"description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.",
"description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.",
"type": "boolean",
"type": "boolean",
"x-go-name": "AutodetectManualMerge"
"x-go-name": "AutodetectManualMerge"
},
},
@ -15619,7 +15619,7 @@
"x-go-name": "DefaultDeleteBranchAfterMerge"
"x-go-name": "DefaultDeleteBranchAfterMerge"
},
},
"default_merge_style": {
"default_merge_style": {
"description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\". `has_pull_requests` must be `true`.",
"description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\".",
"type": "string",
"type": "string",
"x-go-name": "DefaultMergeStyle"
"x-go-name": "DefaultMergeStyle"
},
},
@ -15660,7 +15660,7 @@
"x-go-name": "HasWiki"
"x-go-name": "HasWiki"
},
},
"ignore_whitespace_conflicts": {
"ignore_whitespace_conflicts": {
"description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
"description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.",