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
p.CreateBotDMPost(info.UserID, "Your Github account was disconnected due to an invalid or revoked authorization token. Reconnect your account using the `/github connect` command.", "custom_git_revoked_token")
samlGraphQLErr:=errors.New("error in executing query: GraphQL: Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization.")
515
556
557
+
const (
558
+
expectNone=""
559
+
expectRevoked="revoked"
560
+
expectReauthDM="reauth"
561
+
)
562
+
516
563
tests:= []struct {
517
564
namestring
518
565
errerror
519
-
notifybool
566
+
expectstring
520
567
}{
521
568
{
522
569
name: "401 bad credentials",
523
570
err: errors.New(invalidTokenError),
524
-
notify: true,
571
+
expect: expectRevoked,
525
572
},
526
573
{
527
-
name: "403 SAML REST",
574
+
// SSO URL is available: keep account connected, DM the reauthorize link.
575
+
name: "403 SAML REST with SSO URL",
528
576
err: &github.ErrorResponse{
529
577
Message: "Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization.",
0 commit comments