Skip to content

[public-api] Implement experimental TeamsService.CreateTeam #14152

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

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Oct 25, 2022

Description

Implements TeamsService.CreateTeam by delegating to server.

Related Issue(s)

UI uses this RPC in

How to test

  1. Open up preview, log-in
  2. Obtain a token by running the below in the browser console
    await window._gp.gitpodService.server.generateNewGitpodToken({ type: 1, scopes: ["function:getGitpodTokenScopes",
    	"function:createTeam",
    	"function:getTeamMembers",
    	"function:getGenericInvite",
    	"resource:default",]})
  3. Set your credentials on the command line:
    BEARER_TOKEN="<token>"
  4. Hit the endpoint, adjusting the <team_name> variable
	curl \
    --header 'Content-Type: application/json' \
    --header "Authorization: Bearer $BEARER_TOKEN" \
    --data '{ "name": "<team_name>" }' \
    https://api.mp-papi-crf9cf921e3c.preview.gitpod-dev.com/gitpod.experimental.v1.TeamsService/CreateTeam

{
  "team": {
    "id": "7f8c0ccc-a7a3-42bd-b4ce-81b8f7b5e51b",
    "name": "foobar2",
    "slug": "foobar2",
    "members": [
      {
        "userId": "a7561431-c58d-4c73-830f-0efe83a42387",
        "role": "TEAM_ROLE_OWNER"
      }
    ],
    "teamInvitation": {
      "id": "redacted"
    }
  }
}

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-papi-create-teams-impl.2 because the annotations in the pull request description changed
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from ae15e98 to 3c44cf7 Compare October 25, 2022 11:13
@roboquat roboquat added size/L and removed size/M labels Oct 25, 2022
@easyCZ
Copy link
Member Author

easyCZ commented Oct 25, 2022

/werft run with-clean-slate-deployment=true with-preview

👍 started the job as gitpod-build-mp-papi-create-teams-impl.5
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/papi-experimental-teams-service branch from f20d069 to 44ec8e5 Compare October 25, 2022 13:37
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch 3 times, most recently from cddd604 to dbbb66f Compare October 25, 2022 19:39
@easyCZ
Copy link
Member Author

easyCZ commented Oct 25, 2022

/werft run with-preview

👍 started the job as gitpod-build-mp-papi-create-teams-impl.11
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/papi-experimental-teams-service branch from 44ec8e5 to e0dddc3 Compare October 25, 2022 21:13
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from fc64e6f to b136b39 Compare October 25, 2022 21:14
@easyCZ easyCZ force-pushed the mp/papi-experimental-teams-service branch from e0dddc3 to 9227f67 Compare October 26, 2022 20:16
@easyCZ easyCZ changed the title [public-api] Implement experimental TeamsService [public-api] Implement experimental TeamsService.CreateTeam Oct 26, 2022
@roboquat roboquat added size/XL and removed size/L labels Oct 26, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from 88d80be to cbaed2b Compare October 26, 2022 20:31
@roboquat roboquat added size/L and removed size/XL labels Oct 26, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from cbaed2b to 90be3b9 Compare October 26, 2022 20:40
Base automatically changed from mp/papi-experimental-teams-service to main October 27, 2022 11:27
@roboquat roboquat added size/XL and removed size/L labels Oct 27, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from 56abf4d to 1bb8e5a Compare October 30, 2022 20:30
@roboquat roboquat added size/XL and removed size/L labels Oct 30, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from 1bb8e5a to ee36791 Compare October 31, 2022 14:20
@roboquat roboquat added size/XXL and removed size/XL labels Oct 31, 2022
@easyCZ easyCZ changed the base branch from mp/gitpod-proto-get-generic-invite to main October 31, 2022 14:21
@roboquat roboquat added size/XL and removed size/XXL labels Oct 31, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from 2a3bb53 to ed3b89b Compare October 31, 2022 14:23
@easyCZ easyCZ marked this pull request as ready for review October 31, 2022 14:23
@easyCZ easyCZ requested a review from a team October 31, 2022 14:23
@easyCZ easyCZ marked this pull request as draft October 31, 2022 14:24
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Oct 31, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch from ed3b89b to 43b063a Compare October 31, 2022 19:17
@easyCZ easyCZ marked this pull request as ready for review October 31, 2022 19:43
Copy link
Contributor

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

/hold for nit

tested and works 👍

@laushinka
Copy link
Contributor

laushinka commented Nov 1, 2022

Was testing without reloading, turns out @andrew-farries was faster 🚀
But yes, also works!

@easyCZ
Copy link
Member Author

easyCZ commented Nov 1, 2022

/unhold

@roboquat roboquat merged commit 4c3007a into main Nov 1, 2022
@roboquat roboquat deleted the mp/papi-create-teams-impl branch November 1, 2022 12:56
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/XL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants