Skip to content

Commit

Permalink
Fix merge strategy parsing and default value (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyskoedijk authored Oct 1, 2024
1 parent b27101f commit f7c491c
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,20 @@ export class DependabotOutputProcessor implements IDependabotUpdateOutputProcess
autoComplete: this.taskInputs.setAutoComplete
? {
ignorePolicyConfigIds: this.taskInputs.autoCompleteIgnoreConfigIds,
mergeStrategy:
GitPullRequestMergeStrategy[
this.taskInputs.mergeStrategy as keyof typeof GitPullRequestMergeStrategy
],
mergeStrategy: (() => {
switch (this.taskInputs.mergeStrategy) {
case 'noFastForward':
return GitPullRequestMergeStrategy.NoFastForward;
case 'squash':
return GitPullRequestMergeStrategy.Squash;
case 'rebase':
return GitPullRequestMergeStrategy.Rebase;
case 'rebaseMerge':
return GitPullRequestMergeStrategy.RebaseMerge;
default:
return GitPullRequestMergeStrategy.Squash;
}
})(),
}
: undefined,
assignees: update.config.assignees,
Expand Down

0 comments on commit f7c491c

Please sign in to comment.