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

Fix #10366: Improve messaging when GitHub tokens need SSO authorization #10432

Merged
merged 2 commits into from Jan 8, 2022

Conversation

danepowell
Copy link
Contributor

Fix #10366

This might be a little rough, I tried to keep it consistent with the rest of the auth helper methods which I found a little hard to parse. But if you're happy with the overall approach and provide feedback, I'll clean it up.

src/Composer/Util/GitHub.php Outdated Show resolved Hide resolved
@Seldaek Seldaek added this to the 2.2 milestone Jan 7, 2022
@Seldaek Seldaek added the Bug label Jan 7, 2022
@Seldaek Seldaek changed the base branch from main to 2.2 January 8, 2022 11:00
@Seldaek Seldaek merged commit 93d4c8e into composer:2.2 Jan 8, 2022
@Seldaek
Copy link
Member

Seldaek commented Jan 8, 2022

Thanks


if ($requiresSso) {
$ssoUrl = $gitHubUtil->getSsoUrl($headers);
$message = sprintf(
Copy link

Choose a reason for hiding this comment

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

Here you're using sprintf but you're not really using it, you just concatenate the strings. Is that supposed to be like that? @danepowell @Seldaek

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that looks like a mistake, although it's functional. I'll fix it when I get a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve messaging when GitHub tokens need SSO authorization
4 participants