Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add account setting to link GitHub account #9465

Merged
merged 56 commits into from
Sep 27, 2023
Merged

Conversation

cl8n
Copy link
Member

@cl8n cl8n commented Nov 6, 2022

so open source contributors can link themselves on changelogs

app/Http/Controllers/Account/GithubUsersController.php Outdated Show resolved Hide resolved
app/Models/GithubUser.php Outdated Show resolved Hide resolved
app/Http/Controllers/AccountController.php Outdated Show resolved Hide resolved
.env.example Show resolved Hide resolved
@cl8n
Copy link
Member Author

cl8n commented Dec 9, 2022

oh right I forgot I broke legacy changelog too. i will fix that tomorrow 💤

@cl8n
Copy link
Member Author

cl8n commented May 20, 2023

... I had a long day 😅

I reverted some of the changes I made to the GithubUser model so legacy changelogs can work again (by making fake GithubUser with most attributes missing), and added some notes about the potentially-confusing typing

@peppy peppy requested a review from nanaya June 22, 2023 14:26
resources/js/interfaces/github-user-json.ts Outdated Show resolved Hide resolved
resources/js/github-user/index.tsx Outdated Show resolved Hide resolved
resources/js/github-user/index.tsx Outdated Show resolved Hide resolved
resources/views/accounts/edit.blade.php Outdated Show resolved Hide resolved
app/Http/Controllers/Account/GithubUsersController.php Outdated Show resolved Hide resolved

abort_if($user === null, 422, osu_trans('accounts.github_user.error.no_contribution'));

abort_if($user->user_id !== null, 422, osu_trans('accounts.github_user.error.already_linked'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use also check if there's existing github user for the user id

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that check happens in create()

resources/css/bem/btn-osu-big.less Outdated Show resolved Hide resolved
resources/js/github-user/index.tsx Outdated Show resolved Hide resolved
resources/js/entrypoints/account-edit.tsx Outdated Show resolved Hide resolved
resources/js/github-user/index.tsx Outdated Show resolved Hide resolved
@peppy
Copy link
Sponsor Member

peppy commented Sep 20, 2023

@cl8n is this ready for re-review?

app/Http/Controllers/Account/GithubUsersController.php Outdated Show resolved Hide resolved
app/Http/Controllers/Account/GithubUsersController.php Outdated Show resolved Hide resolved
app/Http/Controllers/Account/GithubUsersController.php Outdated Show resolved Hide resolved
app/Models/User.php Outdated Show resolved Hide resolved
app/Models/GithubUser.php Outdated Show resolved Hide resolved
resources/lang/en/accounts.php Outdated Show resolved Hide resolved
resources/js/interfaces/github-user-json.ts Outdated Show resolved Hide resolved
resources/views/accounts/_edit_github_user.blade.php Outdated Show resolved Hide resolved
@cl8n cl8n requested a review from nanaya September 25, 2023 19:27
@nanaya nanaya merged commit d77a7c7 into ppy:master Sep 27, 2023
2 checks passed
@cl8n cl8n deleted the github-users branch September 27, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants