Skip to content

Commit b37bf9c

Browse files
committed
Merge branch 'main' into ser-401
2 parents 0bddebb + 4f5b370 commit b37bf9c

5 files changed

Lines changed: 296 additions & 295 deletions

File tree

composer.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/VCS/Adapter/Git/GitHub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public function getUser(string $username): array
637637
* Get owner name of the GitHub installation
638638
*
639639
* @param string $installationId GitHub App installation ID
640-
* @param int|null $repositoryId Not used by GitHub (parameter exists for Gitea compatibility)
640+
* @param int|null $repositoryId Not used by GitHub (parameter exists for this adapter compatibility)
641641
* @return string Owner login/username
642642
*/
643643
public function getOwnerName(string $installationId, ?int $repositoryId = null): string

src/VCS/Adapter/Git/Gitea.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ public function initializeVariables(string $installationId, string $privateKey,
7171
return;
7272
}
7373

74-
throw new Exception("accessToken is required for Gitea adapter.");
74+
throw new Exception("accessToken is required for this adapter.");
7575
}
7676

7777
/**
7878
* Generate Access Token
7979
*
80-
* Note: This method is required by the Adapter interface but is not used for Gitea.
80+
* Note: This method is required by the Adapter interface but is not used for this adapter.
8181
* Gitea uses OAuth2 tokens that are provided directly via initializeVariables().
8282
*/
8383
protected function generateAccessToken(string $privateKey, string $appId): void
8484
{
85-
// Not applicable for Gitea - OAuth2 tokens are passed directly
85+
// Not applicable for this adapter - OAuth2 tokens are passed directly
8686
return;
8787
}
8888

@@ -224,7 +224,7 @@ public function searchRepositories(string $owner, int $page, int $per_page, stri
224224
*/
225225
public function getInstallationRepository(string $repositoryName): array
226226
{
227-
throw new Exception("getInstallationRepository is not applicable for Gitea - use getRepository() with owner and repo name instead");
227+
throw new Exception("getInstallationRepository is not applicable for this adapter - use getRepository() with owner and repo name instead");
228228
}
229229

230230
public function getRepository(string $owner, string $repositoryName): array
@@ -608,7 +608,7 @@ public function getUser(string $username): array
608608
public function getOwnerName(string $installationId, ?int $repositoryId = null): string
609609
{
610610
if ($repositoryId === null || $repositoryId <= 0) {
611-
throw new Exception("repositoryId is required for Gitea");
611+
throw new Exception("repositoryId is required for this adapter");
612612
}
613613

614614
$url = "/repositories/{$repositoryId}";

0 commit comments

Comments
 (0)