Skip to content

Commit

Permalink
Revert "Temporarily force GitHub App installation on own repos"
Browse files Browse the repository at this point in the history
Commit: 3292369
  • Loading branch information
brunolemos committed Oct 23, 2019
1 parent f8075a8 commit ec9bb0f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 92 deletions.
46 changes: 0 additions & 46 deletions packages/components/src/containers/EventCardsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,9 @@ export const EventCardsContainer = React.memo(
)

const dispatch = useDispatch()
const username = useReduxState(selectors.currentGitHubUsernameSelector)
const installationsLoadState = useReduxState(
selectors.installationsLoadStateSelector,
)
const installationOwnerNames = useReduxState(
selectors.installationOwnerNamesSelector,
)

const subscriptionsDataSelectorRef = useRef(
selectors.createSubscriptionsDataSelector(),
Expand Down Expand Up @@ -207,48 +203,6 @@ export const EventCardsContainer = React.memo(
}
}

if (
username &&
`${subscriptionOwnerOrOrg || ''}`.toLowerCase() ===
`${username || ''}`.toLowerCase() &&
!(installationOwnerNames && installationOwnerNames.length)
) {
return (
<View
style={[
sharedStyles.flex,
sharedStyles.center,
{
padding: contentPadding,
},
]}
>
<GenericMessageWithButtonView
buttonView={
<ButtonLink
analyticsLabel="setup_github_app_from_user_repo_column"
children="Install GitHub App"
disabled={
mainSubscription.data.loadState === 'loading' ||
mainSubscription.data.loadState === 'loading_first'
}
href={getGitHubAppInstallUri()}
loading={
installationsLoadState === 'loading' ||
mainSubscription.data.loadState === 'loading' ||
mainSubscription.data.loadState === 'loading_first'
}
openOnNewTab={false}
/>
}
emoji="sunny"
subtitle="Please install the GitHub App to continue. No code permission required."
title="Not installed"
/>
</View>
)
}

if (!column) return null

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,9 @@ export const IssueOrPullRequestCardsContainer = React.memo(
)

const dispatch = useDispatch()
const username = useReduxState(selectors.currentGitHubUsernameSelector)
const installationsLoadState = useReduxState(
selectors.installationsLoadStateSelector,
)
const installationOwnerNames = useReduxState(
selectors.installationOwnerNamesSelector,
)

const { allItems, filteredItems } = useColumnData<
EnhancedGitHubIssueOrPullRequest
Expand Down Expand Up @@ -195,48 +191,6 @@ export const IssueOrPullRequestCardsContainer = React.memo(
}
}

if (
username &&
`${subscriptionOwnerOrOrg || ''}`.toLowerCase() ===
`${username || ''}`.toLowerCase() &&
!(installationOwnerNames && installationOwnerNames.length)
) {
return (
<View
style={[
sharedStyles.flex,
sharedStyles.center,
{
padding: contentPadding,
},
]}
>
<GenericMessageWithButtonView
buttonView={
<ButtonLink
analyticsLabel="setup_github_app_from_user_repo_column"
children="Install GitHub App"
disabled={
mainSubscription.data.loadState === 'loading' ||
mainSubscription.data.loadState === 'loading_first'
}
href={getGitHubAppInstallUri()}
loading={
installationsLoadState === 'loading' ||
mainSubscription.data.loadState === 'loading' ||
mainSubscription.data.loadState === 'loading_first'
}
openOnNewTab={false}
/>
}
emoji="sunny"
subtitle="Please install the GitHub App to continue. No code permission required."
title="Not installed"
/>
</View>
)
}

if (!column) return null

return (
Expand Down

0 comments on commit ec9bb0f

Please sign in to comment.