Skip to content

Conversation

@mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented Nov 27, 2023

Description

Summary generated by Copilot

🤖[deprecated] Generated by Copilot at 8ba3e63

No summary available (Limit exceeded: required to process 106320 tokens, but only 50000 are allowed per call)

Related Issue(s)

Fixes EXP-846

How to test

Test 1

Create a fresh GitHub account and sign in (use admin to unblock).
You should need to do phone number verification before you can start your first workspace.
Once the number is verified you should be able to work as usual.

Test 2

Use a GitHub account older than 30 days.
You should be able to start a workspace without verification.

Test 1 ++

delete the lastVerificationTimestamp in your user's additional Data.
if the account had started a workspace before, you should not need to verify
if the account doesn't have any workspaces, you should be asked to verify

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@akosyakov
Copy link
Member

I'm not sure how to test. We need to ask for help to clarify. cc @geropl

return user;
}

public async verifyOrgMembers(organizationId: string): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

is it fine that we are changing the logic here, are there DB tests for this service? If we are just moving functions without changing semantic is fine with me without adding tests, but if we start changing code we should rather start adding tests.

Copy link
Member

Choose a reason for hiding this comment

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

It's just moving functions

},
);
const channel = phoneVerificationByCall ? "call" : "sms";
const { verificationId } = await this.verificationService.sendVerificationToken(
Copy link
Member

Choose a reason for hiding this comment

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

we are missing analytics enent here which is present in JSON-RPC

I think much of code from JSON-RPC should have been moved to VerificationService and not copied in API layer, here we shoudl not have logic but rather only translations

if (!req.token) {
throw new ApplicationError(ErrorCodes.BAD_REQUEST, "token is required");
}
const phoneNumber = formatPhoneNumber(req.phoneNumber);
Copy link
Member

Choose a reason for hiding this comment

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

it should be part of verificaiton services, not copied pasted

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

Code changes look good. I didn't test, though

@roboquat roboquat merged commit 0acd42e into main Nov 28, 2023
@roboquat roboquat deleted the hw/papi-auth branch November 28, 2023 15:56
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.

6 participants