Skip to content

Commit

Permalink
GL-2639: Initialise project with default branch and readme file. (#1754)
Browse files Browse the repository at this point in the history
* GL-2639: Initialize project with dedault branch and readme file.

* GL-2639: Updated testcase for project initialization.
  • Loading branch information
akashkska authored Jun 24, 2024
1 parent ac0e84b commit 8f5cd12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Command/CodeStudio/CodeStudioCommandTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ private function setGitLabProjectDescription(mixed $cloudApplicationUuid): void
private function getGitLabProjectDefaults(): array {
return [
'container_registry_access_level' => 'disabled',
'default_branch' => 'main',
'description' => $this->gitLabProjectDescription,
'initialize_with_readme' => TRUE,
'topics' => 'Acquia Cloud Application',
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,19 @@ public function testCommand(array $mockedGitlabProjects, array $inputs, array $a
$projects = $this->mockGetGitLabProjects($this::$applicationUuid, $this->gitLabProjectId, $mockedGitlabProjects);
$parameters = [
'container_registry_access_level' => 'disabled',
'default_branch' => 'main',
'description' => 'Source repository for Acquia Cloud Platform application <comment>a47ac10b-58cc-4372-a567-0e02b2c3d470</comment>',
'initialize_with_readme' => TRUE,
'namespace_id' => 47,
'topics' => 'Acquia Cloud Application',
];
$projects->create('Sample-application-1', $parameters)->willReturn($this->getMockedGitLabProject($this->gitLabProjectId));
$this->mockGitLabProjectsTokens($projects);
$parameters = [
'container_registry_access_level' => 'disabled',
'default_branch' => 'main',
'description' => 'Source repository for Acquia Cloud Platform application <comment>a47ac10b-58cc-4372-a567-0e02b2c3d470</comment>',
'initialize_with_readme' => TRUE,
'topics' => 'Acquia Cloud Application',
];
$projects->update($this->gitLabProjectId, $parameters)->shouldBeCalled();
Expand Down

0 comments on commit 8f5cd12

Please sign in to comment.