mirror of
https://github.com/harness/drone.git
synced 2025-05-04 13:40:38 +08:00
fix: [code-2105]: fix available merge strats (#2206)
* fix: [code-2105]: fix available merge strats
This commit is contained in:
parent
4ac42fc6c9
commit
feecde9faa
@ -209,7 +209,11 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
|
||||
if (allowedStrats) {
|
||||
const matchingMethods = mergeOptions.filter(option => allowedStrats.includes(option.method))
|
||||
if (matchingMethods.length > 0) {
|
||||
setMergeOption(mergeOption ? mergeOption : matchingMethods[0])
|
||||
if (mergeOption && !matchingMethods.includes(mergeOption)) {
|
||||
setMergeOption(matchingMethods[0])
|
||||
} else {
|
||||
setMergeOption(mergeOption)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setMergeOption(mergeOptions[3])
|
||||
|
Loading…
Reference in New Issue
Block a user