Repository: supabase/supabase
File: apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx (TypeScript)

Code before:
          ) : !canReadGitHubConnection ? (
            <NoPermission resourceText="view this organization's GitHub connections" />
          ) : (
            <div className="space-y-6">
              <div>
                <h5 className="text-foreground mb-2">How does the GitHub integration work?</h5>
                <p className="text-foreground-light text-sm mb-6">
                  Connecting to GitHub allows you to sync preview branches with a chosen GitHub
                  branch, keep your production branch in sync, and automatically create preview
                  branches for every pull request.
                </p>

                {promptProPlanUpgrade && (
                  <div className="mb-6">
                    <UpgradeToPro
                      source="github-integration"
                      featureProposition="use GitHub integrations"
                      primaryText={`Upgrade to ${!!existingConnection ? 'manage' : 'unlock'} GitHub integration`}
                      secondaryText="Connect your GitHub repository to automatically sync preview branches and deploy changes."
                    />
                  </div>
                )}

                {/* [Joshen] Show connection form if GH has already been authorized OR no GH authorization but on a paid plan */}
                {/* So this shouldn't render if there's no GH authorization and on a free plan */}
                {(!!gitHubAuthorization || (!gitHubAuthorization && !promptProPlanUpgrade)) && (
                  <GitHubIntegrationConnectionForm
                    disabled={promptProPlanUpgrade}
                    connection={existingConnection}
                  />
                )}
              </div>
            </div>
          )}
        </ScaffoldSectionContent>
      </ScaffoldSection>
    </ScaffoldContainer>
  )
}


Review comment (security):
Is this the same as:
```suggestion
                {(!!gitHubAuthorization || !promptProPlanUpgrade) && (
```


Code after:
          ) : !canReadGitHubConnection ? (
            <NoPermission resourceText="view this organization's GitHub connections" />
          ) : (
            <div className="space-y-6">
              <div>
                <h5 className="text-foreground mb-2">How does the GitHub integration work?</h5>
                <p className="text-foreground-light text-sm mb-6">
                  Connecting to GitHub allows you to sync preview branches with a chosen GitHub
                  branch, keep your production branch in sync, and automatically create preview
                  branches for every pull request.
                </p>

                {promptProPlanUpgrade && (
                  <div className="mb-6">
                    <UpgradeToPro
                      source="github-integration"
                      featureProposition="use GitHub integrations"
                      primaryText={`Upgrade to ${!!existingConnection ? 'manage' : 'unlock'} GitHub integration`}
                      secondaryText="Connect your GitHub repository to automatically sync preview branches and deploy changes."
                    />
                  </div>
                )}

                {/* [Joshen] Show connection form if GH has already been authorized OR no GH authorization but on a paid plan */}
                {/* So this shouldn't render if there's no GH authorization and on a free plan */}
                {(!!gitHubAuthorization || !promptProPlanUpgrade) && (
                  <GitHubIntegrationConnectionForm
                    disabled={promptProPlanUpgrade}
                    connection={existingConnection}
                  />
                )}
              </div>
            </div>
          )}
        </ScaffoldSectionContent>
      </ScaffoldSection>
    </ScaffoldContainer>
  )
}