Skip to content
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

Merged
merged 6 commits into from
May 6, 2024

Conversation

shivam-bit
Copy link
Contributor

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.

@shivam-bit shivam-bit self-assigned this May 6, 2024
@@ -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);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.

Comment on lines +90 to +94
// @ts-ignore
Authorization: `token ${dec(token)}`
}
});
return response.status === 200; // Check for successful response status code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it was intentional

Copy link
Contributor

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 && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{integrations.github && (
{isGithubIntegrated && (

Copy link
Contributor

@samad-yar-khan samad-yar-khan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shivam-bit 🎸 🚗

@shivam-bit shivam-bit merged commit b794308 into main May 6, 2024
1 check passed
@shivam-bit shivam-bit deleted the GROW-1385 branch May 6, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants