-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Analytics] Include Invite ID with Team created Call #8949
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
Conversation
/werft run |
682a8bf
to
db8d56c
Compare
/werft run 👍 started the job as gitpod-build-jh-team-invite-call.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible, just a question to clarify my understanding.
@@ -1974,6 +1974,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { | |||
// Note: this operation is per-user only, hence needs no resource guard | |||
const user = this.checkAndBlockUser("createTeam"); | |||
const team = await this.teamDB.createTeam(user.id, name); | |||
const invite = await this.getGenericInvite(ctx, team.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retrieval of the genericInvite
seems to also reset the invite link. Is this potentially a problem if the invite has already been sent? I'm not intimately familiar with the product/code behaviour in this area so seeking clarification.
public async resetGenericInvite(ctx: TraceContext, teamId: string): Promise<TeamMembershipInvite> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @easyCZ , thanks for having a look! i went back into the preview environment and checked, the invite URL attached to the team created call here does not change unless the reset invite button is clicked below (at which point any previously sent invites lose their validity). thus, using this.getGenericInvite()
is fine here imo as:
- no invites to a team can be sent prior to its creation
- the behaviour after this call is consistent with what's happening now as the invite URL remains the same unless it's manually reset
/werft run 👍 started the job as gitpod-build-jh-team-invite-call.3 |
Description
Generates and includes an invitation ID with each team created Segment call. This is done in order to have an ID available in downstream tools after a team was created so that it can be sent to users outside of the product.
How to test
and ensure that the
team_created
call includes aninvite_id
Release Notes
Documentation
/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe