Skip to content

Commit b7516e4

Browse files
Nyholmcafferata
andauthored
[12.1] Add support for "force" when creating commit (#836)
* add support for "force" when creating commit * fix type Co-authored-by: Jeffrey Cafferata <[email protected]> --------- Co-authored-by: Jeffrey Cafferata <[email protected]>
1 parent 1bf5326 commit b7516e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Api/Repositories.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ public function commitRefs(int|string $project_id, string $sha, array $parameter
191191
* @var string $branch Name of the branch to commit into. To create a new branch, also provide start_branch.
192192
* @var string $commit_message commit message
193193
* @var string $start_branch name of the branch to start the new commit from
194+
* @var bool $force true if the new changes should override existing ones
194195
* @var array $actions {
195196
* @var string $action he action to perform, create, delete, move, update
196197
* @var string $file_path full path to the file
@@ -212,6 +213,8 @@ public function createCommit(int|string $project_id, array $parameters = []): mi
212213
->setRequired('commit_message')
213214
;
214215
$resolver->setDefined('start_branch');
216+
$resolver->setDefined('force')
217+
->setAllowedTypes('force', 'bool');
215218
$resolver->setDefined('actions')
216219
->setRequired('actions')
217220
->setAllowedTypes('actions', 'array')

0 commit comments

Comments
 (0)