Skip to content

Commit 39873f0

Browse files
authored
Change "Github" to "GitHub" (#974)
1 parent 3868c3f commit 39873f0

File tree

11 files changed

+26
-26
lines changed

11 files changed

+26
-26
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We very much appreciate any help with [open issues labeled with "help wanted"](h
2525

2626
- It's a good practice to write tests for your contribution
2727
- Write the full namespace in DocBlocks for `@param`, `@var` or `@return` tags
28-
- The rest of the coding standards will automatically fixed by [Github Actions](https://github.com/laravelio/laravel.io/actions)
28+
- The rest of the coding standards will automatically be fixed by [GitHub Actions](https://github.com/laravelio/laravel.io/actions)
2929

3030
## Testing
3131

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This is the repository for the [Laravel.io](http://laravel.io) community portal.
1717

1818
## Sponsors
1919

20-
We'd like to thank these **amazing companies** for sponsoring us. If you are interested in becoming a sponsor, please visit <a href="https://github.com/sponsors/laravelio">the Laravel.io Github Sponsors page</a>.
20+
We'd like to thank these **amazing companies** for sponsoring us. If you are interested in becoming a sponsor, please visit <a href="https://github.com/sponsors/laravelio">the Laravel.io GitHub Sponsors page</a>.
2121

2222
- **[Eventy](https://https://eventy.io/?utm_source=Laravel.io&utm_campaign=eventy&utm_medium=advertisement)**
2323
- [Forge](https://forge.laravel.com)
@@ -54,9 +54,9 @@ The following tools are required in order to start the installation.
5454

5555
You can now visit the app in your browser by visiting [http://laravel.io.test](http://laravel.io.test). If you seeded the database you can login into a test account with **`testing`** & **`password`**.
5656

57-
### Github Authentication (optional)
57+
### GitHub Authentication (optional)
5858

59-
To get Github authentication to work locally, you'll need to [register a new OAuth application on Github](https://github.com/settings/applications/new). Use `http://laravel.io.test` for the homepage url and `http://laravel.io.test/auth/github` for the callback url. When you've created the app, fill in the ID and secret in your `.env` file in the env variables below. You should now be able to authentication with Github.
59+
To get GitHub authentication to work locally, you'll need to [register a new OAuth application on GitHub](https://github.com/settings/applications/new). Use `http://laravel.io.test` for the homepage url and `http://laravel.io.test/auth/github` for the callback url. When you've created the app, fill in the ID and secret in your `.env` file in the env variables below. You should now be able to authentication with GitHub.
6060

6161
```
6262
GITHUB_ID=
@@ -66,7 +66,7 @@ GITHUB_URL=http://laravel.io.test/auth/github
6666

6767
### Algolia Search (optional)
6868

69-
To get Algolia search running locally, you'll need to [register for a new account](https://www.algolia.com/users/sign_up) and create an index called `threads`. Algolia has a free tier that satisfies all of the requirements needed for a development environment. Now update the below variables in your `.env` file. The App ID and secret keys can be found in the `API Keys` section of the Algoila UI.
69+
To get Algolia search running locally, you'll need to [register for a new account](https://www.algolia.com/users/sign_up) and create an index called `threads`. Algolia has a free tier that satisfies all of the requirements needed for a development environment. Now update the below variables in your `.env` file. The App ID and secret keys can be found in the `API Keys` section of the Algoila UI.
7070

7171
```
7272
SCOUT_DRIVER=algolia
@@ -94,7 +94,7 @@ php artisan scout:flush App\\Models\\Thread
9494

9595
### Twitter Sharing (optional)
9696

97-
To enable published articles to be automatically shared on Twitter, you'll need to [create a Twitter app](https://developer.twitter.com/apps/). Once the app has been created, update the below variables in your `.env` file. The consumer key and secret and access token and secret can be found in the `Keys and tokens` section of the Twitter developers UI.
97+
To enable published articles to be automatically shared on Twitter, you'll need to [create a Twitter app](https://developer.twitter.com/apps/). Once the app has been created, update the below variables in your `.env` file. The consumer key and secret and access token and secret can be found in the `Keys and tokens` section of the Twitter developers UI.
9898

9999
```
100100
TWITTER_CONSUMER_KEY=

app/Http/Controllers/Auth/GithubController.php renamed to app/Http/Controllers/Auth/GitHubController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
use App\Http\Controllers\Controller;
66
use App\Jobs\UpdateProfile;
77
use App\Models\User;
8-
use App\Social\GithubUser;
8+
use App\Social\GitHubUser;
99
use Illuminate\Database\Eloquent\ModelNotFoundException;
1010
use Illuminate\Http\RedirectResponse;
1111
use Illuminate\Support\Facades\Auth;
1212
use Laravel\Socialite\Facades\Socialite;
1313
use Laravel\Socialite\Two\InvalidStateException;
1414
use Laravel\Socialite\Two\User as SocialiteUser;
1515

16-
class GithubController extends Controller
16+
class GitHubController extends Controller
1717
{
1818
/**
1919
* Redirect the user to the GitHub authentication page.
@@ -37,9 +37,9 @@ public function handleProviderCallback()
3737
}
3838

3939
try {
40-
$user = User::findByGithubId($socialiteUser->getId());
40+
$user = User::findByGitHubId($socialiteUser->getId());
4141
} catch (ModelNotFoundException $exception) {
42-
return $this->userNotFound(new GithubUser($socialiteUser->getRaw()));
42+
return $this->userNotFound(new GitHubUser($socialiteUser->getRaw()));
4343
}
4444

4545
return $this->userFound($user, $socialiteUser);
@@ -59,7 +59,7 @@ private function userFound(User $user, SocialiteUser $socialiteUser): RedirectRe
5959
return redirect()->route('profile');
6060
}
6161

62-
private function userNotFound(GithubUser $user): RedirectResponse
62+
private function userNotFound(GitHubUser $user): RedirectResponse
6363
{
6464
if ($user->isTooYoung()) {
6565
$this->error('errors.github_account_too_young');
@@ -76,7 +76,7 @@ private function userNotFound(GithubUser $user): RedirectResponse
7676
return $this->redirectUserToRegistrationPage($user);
7777
}
7878

79-
private function redirectUserToRegistrationPage(GithubUser $user): RedirectResponse
79+
private function redirectUserToRegistrationPage(GitHubUser $user): RedirectResponse
8080
{
8181
session(['githubData' => $user->toArray()]);
8282

app/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public static function findByEmailAddress(string $emailAddress): self
252252
return self::where('email', $emailAddress)->firstOrFail();
253253
}
254254

255-
public static function findByGithubId(string $githubId): self
255+
public static function findByGitHubId(string $githubId): self
256256
{
257257
return self::where('github_id', $githubId)->firstOrFail();
258258
}

app/Rules/UniqueGitHubUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class UniqueGitHubUser implements Rule
1616
public function passes($attribute, $value): bool
1717
{
1818
try {
19-
$this->user = User::findByGithubId($value);
19+
$this->user = User::findByGitHubId($value);
2020
} catch (ModelNotFoundException) {
2121
return true;
2222
}

app/Social/GithubUser.php renamed to app/Social/GitHubUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Illuminate\Contracts\Support\Arrayable;
77
use Illuminate\Support\Arr;
88

9-
final class GithubUser implements Arrayable
9+
final class GitHubUser implements Arrayable
1010
{
1111
public function __construct(
1212
private array $attributes

lang/en/errors.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'banned' => 'This account is banned.',
55
'fields' => 'Something went wrong. Please review the fields below.',
66
'github_invalid_state' => 'The request timed out. Please try again.',
7-
'github_account_too_young' => 'Your Github account needs to be older than 2 weeks in order to register.',
8-
'github_account_no_repositories' => 'Your Github account needs to have at least 1 public repository in order to register.',
7+
'github_account_too_young' => 'Your GitHub account needs to be older than 2 weeks in order to register.',
8+
'github_account_no_repositories' => 'Your GitHub account needs to have at least 1 public repository in order to register.',
99
'github_account_exists' => 'We already found a user with the given GitHub account (:username). Would you like to <a href=":login">login</a> instead?',
1010
];

resources/views/errors/500.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1 class="text-5xl">{{ $title }}</h1>
88
<p class="text-lg">
99
We've been notified and will try to fix the problem as soon as possible.<br>
10-
Please <a href="https://github.com/laravelio/laravel.io/issues/new" class="text-lio-700">open a Github issue</a> if the problem persists.
10+
Please <a href="https://github.com/laravelio/laravel.io/issues/new" class="text-lio-700">open a GitHub issue</a> if the problem persists.
1111
</p>
1212
</div>
1313
@endsection

resources/views/layouts/_nav.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<li class="my-4 lg:hover:bg-gray-100 lg:my-0">
9393
<a href="https://github.com/laravelio" class="inline-block w-full lg:px-4 lg:py-3">
9494
<x-icon-github class="w-4 h-4 inline"/>
95-
Github
95+
GitHub
9696
</a>
9797
</li>
9898

routes/web.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use App\Http\Controllers\Articles\ArticlesController;
77
use App\Http\Controllers\Articles\AuthoredArticles;
88
use App\Http\Controllers\Auth\ForgotPasswordController;
9-
use App\Http\Controllers\Auth\GithubController;
9+
use App\Http\Controllers\Auth\GitHubController;
1010
use App\Http\Controllers\Auth\LoginController;
1111
use App\Http\Controllers\Auth\RegisterController;
1212
use App\Http\Controllers\Auth\ResetPasswordController;
@@ -62,8 +62,8 @@
6262
Route::post('email/resend', [VerificationController::class, 'resend'])->name('verification.resend');
6363

6464
// Social authentication
65-
Route::get('login/github', [GithubController::class, 'redirectToProvider'])->name('login.github');
66-
Route::get('auth/github', [GithubController::class, 'handleProviderCallback']);
65+
Route::get('login/github', [GitHubController::class, 'redirectToProvider'])->name('login.github');
66+
Route::get('auth/github', [GitHubController::class, 'handleProviderCallback']);
6767

6868
// Users
6969
Route::redirect('/dashboard', '/user');

0 commit comments

Comments
 (0)