-
Notifications
You must be signed in to change notification settings - Fork 106
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
"Update GitHub integration handling and token validation" #278
Conversation
web-server/pages/integrations.tsx
Outdated
@@ -55,7 +55,7 @@ const Content = () => { | |||
orgId, | |||
integrations: { github: isGithubIntegrated } | |||
} = useAuth(); | |||
const isLinked = useSelector((s) => s.auth.org.integrations.github === true); | |||
const isLinked = useSelector((s) => s.auth.org?.integrations.github === true); |
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.
this and below code seems a bit repetitive ?
@@ -21,7 +21,7 @@ const getRadiusWithPadding = (radius: number, padding: number) => | |||
|
|||
export const GithubIntegrationCard = () => { | |||
const theme = useTheme(); | |||
const isLinked = useSelector((s) => s.auth.org.integrations.github === true); | |||
const isLinked = useSelector((s) => s.auth.org?.integrations.github === true); |
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.
this.
// @ts-ignore | ||
Authorization: `token ${dec(token)}` | ||
} | ||
}); | ||
return response.status === 200; // Check for successful response status code |
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.
comments
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.
actually it was intentional
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.
got it
@@ -37,7 +39,7 @@ export const GithubIntegrationCard = () => { | |||
|
|||
return ( | |||
<FlexBox relative> | |||
{isLinked && ( | |||
{integrations.github && ( |
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.
{integrations.github && ( | |
{isGithubIntegrated && ( |
… of integrations.github
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.
Thanks @shivam-bit 🎸 🚗
This pull request includes updates to handle nullable org integrations in the GitHubIntegrationCard, integrations.tsx, and session.ts files. It also adds token validation for GitHub integrations.