mirror of https://github.com/harness/drone.git
fix: [code-2105]: fix available merge strats (#2206)
* fix: [code-2105]: fix available merge stratsunified-ui
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