From 81dc63e4ff6e96d5c73ce14c98d65afaa314ff7a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 24 Jun 2025 09:29:21 +0200 Subject: [PATCH 1/2] add support for "force" when creating commit --- src/Api/Repositories.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Api/Repositories.php b/src/Api/Repositories.php index eded16b9..bb6447e8 100644 --- a/src/Api/Repositories.php +++ b/src/Api/Repositories.php @@ -191,6 +191,7 @@ public function commitRefs(int|string $project_id, string $sha, array $parameter * @var string $branch Name of the branch to commit into. To create a new branch, also provide start_branch. * @var string $commit_message commit message * @var string $start_branch name of the branch to start the new commit from + * @var bool $force true if the new changes should override exisitng ones * @var array $actions { * @var string $action he action to perform, create, delete, move, update * @var string $file_path full path to the file @@ -212,6 +213,8 @@ public function createCommit(int|string $project_id, array $parameters = []): mi ->setRequired('commit_message') ; $resolver->setDefined('start_branch'); + $resolver->setDefined('force') + ->setAllowedTypes('force', 'bool'); $resolver->setDefined('actions') ->setRequired('actions') ->setAllowedTypes('actions', 'array') From 2cfbadfd22a5cd94ead9b92326c63069e2bfeb06 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 24 Jun 2025 11:12:42 +0200 Subject: [PATCH 2/2] fix type Co-authored-by: Jeffrey Cafferata --- src/Api/Repositories.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Repositories.php b/src/Api/Repositories.php index bb6447e8..b3c1f890 100644 --- a/src/Api/Repositories.php +++ b/src/Api/Repositories.php @@ -191,7 +191,7 @@ public function commitRefs(int|string $project_id, string $sha, array $parameter * @var string $branch Name of the branch to commit into. To create a new branch, also provide start_branch. * @var string $commit_message commit message * @var string $start_branch name of the branch to start the new commit from - * @var bool $force true if the new changes should override exisitng ones + * @var bool $force true if the new changes should override existing ones * @var array $actions { * @var string $action he action to perform, create, delete, move, update * @var string $file_path full path to the file