Skip to content

add support for "force" when creating commit #836

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: 12.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Api/Repositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand All @@ -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')
Expand Down