You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err=tx.QueryRowContext(ctx, `SELECT source_updated_at,observation_sequence FROM actor_contribution_periods WHERE actor_id=? AND period_start=? AND period_end=? AND organization_node_id=? AND authorization_scope=?`, input.ActorID, encodeTime(input.From), encodeTime(input.To), input.OrganizationNodeID, input.AuthorizationScope).Scan(&existingSource, &existingSequence)
168
+
err=tx.QueryRowContext(ctx, `SELECT complete,source_updated_at,observation_sequence FROM actor_contribution_periods WHERE actor_id=? AND period_start=? AND period_end=? AND organization_node_id=? AND authorization_scope=?`, input.ActorID, encodeTime(input.From), encodeTime(input.To), input.OrganizationNodeID, input.AuthorizationScope).Scan(&existingComplete, &existingSource, &existingSequence)
where+=` AND (a.actor_key IN (`+strings.Join(placeholders, ",") +`) OR a.node_id IN (`+strings.Join(placeholders, ",") +`) OR a.id IN (SELECT actor_id FROM actor_aliases WHERE normalized_login IN (`+strings.Join(placeholders, ",") +`)))`
307
+
where+=` AND (a.actor_key IN (`+strings.Join(placeholders, ",") +`) OR a.node_id IN (`+strings.Join(placeholders, ",") +`) OR a.id IN (SELECT actor_id FROM actor_aliases WHERE active=1 AND normalized_login IN (`+strings.Join(placeholders, ",") +`)))`
iferr:=c.db.QueryRowContext(ctx, `SELECT active FROM actor_aliases WHERE actor_id=? AND normalized_login='mona'`, otherProvider.ID).Scan(&otherProviderAliasActive); err!=nil {
103
+
t.Fatal(err)
104
+
}
105
+
if!otherProviderAliasActive {
106
+
t.Fatal("reusing a GitHub login deactivated the same alias for another provider")
0 commit comments