Skip to content

Commit f4a5797

Browse files
committed
fix casing for"GitHub "
1 parent 6750164 commit f4a5797

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

configure.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function replaceForAllOtherOSes(): array
141141
return explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|migration_table_name|vendor_name|vendor_slug|[email protected]" --exclude-dir=vendor ./* ./.github/* | grep -v '.basename(__FILE__)));
142142
}
143143

144-
function getGithubApiEndpoint(string $endpoint): ?stdClass
144+
function getGitHubApiEndpoint(string $endpoint): ?stdClass
145145
{
146146
try {
147147
$curl = curl_init("https://api.github.com/{$endpoint}");
@@ -169,7 +169,7 @@ function getGithubApiEndpoint(string $endpoint): ?stdClass
169169
return null;
170170
}
171171

172-
function searchCommitsForGithubUsername(): string
172+
function searchCommitsForGitHubUsername(): string
173173
{
174174
$authorName = strtolower(trim(shell_exec('git config user.name')));
175175

@@ -195,7 +195,7 @@ function searchCommitsForGithubUsername(): string
195195
return explode('@', $firstCommitter['email'])[0] ?? '';
196196
}
197197

198-
function guessGithubUsernameUsingCli()
198+
function guessGitHubUsernameUsingCli()
199199
{
200200
try {
201201
if (preg_match('/ogged in to github\.com as ([a-zA-Z-_]+).+/', shell_exec('gh auth status -h github.com 2>&1'), $matches)) {
@@ -208,14 +208,14 @@ function guessGithubUsernameUsingCli()
208208
return '';
209209
}
210210

211-
function guessGithubUsername(): string
211+
function guessGitHubUsername(): string
212212
{
213-
$username = searchCommitsForGithubUsername();
213+
$username = searchCommitsForGitHubUsername();
214214
if (! empty($username)) {
215215
return $username;
216216
}
217217

218-
$username = guessGithubUsernameUsingCli();
218+
$username = guessGitHubUsernameUsingCli();
219219
if (! empty($username)) {
220220
return $username;
221221
}
@@ -227,12 +227,12 @@ function guessGithubUsername(): string
227227
return $remoteUrlParts[1] ?? '';
228228
}
229229

230-
function guessGithubVendorInfo($authorName, $username): array
230+
function guessGitHubVendorInfo($authorName, $username): array
231231
{
232232
$remoteUrl = shell_exec('git config remote.origin.url');
233233
$remoteUrlParts = explode('/', str_replace(':', '/', trim($remoteUrl)));
234234

235-
$response = getGithubApiEndpoint("orgs/{$remoteUrlParts[1]}");
235+
$response = getGitHubApiEndpoint("orgs/{$remoteUrlParts[1]}");
236236

237237
if ($response === null) {
238238
return $username;
@@ -246,12 +246,12 @@ function guessGithubVendorInfo($authorName, $username): array
246246

247247
$gitEmail = run('git config user.email');
248248
$authorEmail = ask('Author email', $gitEmail);
249-
$authorUsername = ask('Author username', guessGithubUsername());
249+
$authorUsername = ask('Author username', guessGitHubUsername());
250250

251-
$guessGithubVendorInfo = guessGithubVendorInfo($authorName, $authorUsername);
251+
$guessGitHubVendorInfo = guessGitHubVendorInfo($authorName, $authorUsername);
252252

253-
$vendorName = ask('Vendor name', $guessGithubVendorInfo[0]);
254-
$vendorUsername = ask('Vendor username', $guessGithubVendorInfo[1] ?? slugify($vendorName));
253+
$vendorName = ask('Vendor name', $guessGitHubVendorInfo[0]);
254+
$vendorUsername = ask('Vendor username', $guessGitHubVendorInfo[1] ?? slugify($vendorName));
255255
$vendorSlug = slugify($vendorUsername);
256256

257257
$vendorNamespace = str_replace('-', '', ucwords($vendorName));

0 commit comments

Comments
 (0)