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

feat: add GitHub team import to new list page #2006

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

brandonroberts
Copy link
Contributor

Description

  • Adds GitHub Team import to new list creation page
  • Adds additional org scope to auth flow

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Closes https://github.com/open-sauced/engineering/issues/179

Mobile & Desktop Screenshots/Recordings

image

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Oct 25, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit c3712f3
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/653ab3fb1e51ff0008111a4f
😎 Deploy Preview https://deploy-preview-2006--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 25, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit c3712f3
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/653ab3fbdc074e000839e39a
😎 Deploy Preview https://deploy-preview-2006--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brandonroberts brandonroberts requested review from isabensusan and a team October 25, 2023 19:39
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Issue Reference

In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our Contributing Guide.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.

pages/hub/lists/new.tsx Outdated Show resolved Hide resolved
await signIn({ provider: "github", options: { redirectTo: `${host}${currentPath}` } })
await signIn({
provider: "github",
options: { redirectTo: `${host}${currentPath}`, scopes: "read:org" },
Copy link
Member

Choose a reason for hiding this comment

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

Note: I had to sign out and sign back in on an incognito browser to get the higher scope auth flow to kick off.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we need to indicate that they may need to log out, or I wonder if there's a way for us to get the higher auth scope to catch?

Copy link
Member

Choose a reason for hiding this comment

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

It seems the whole auth flow needs to be re-triggered. I got this email once I did:

Hey jpmcb!

Previously, a third-party OAuth application (auth-beta-opensauced) had user:email scope. It was recently granted an additional scope (read:org). Visit ... for more information.

To see this and other security events for your account, visit https://github.com/settings/security-log

If you run into problems, please contact support by visiting https://github.com/contact

Thanks,
The GitHub Team

which makes me think that it'll fail until the higher auth is granted explicitly by the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's true about the new auth flow. We could do an API check when they click the first button and redirect them if necessary, but thats adds a bit of friction.

Copy link
Member

@bdougie bdougie Oct 25, 2023

Choose a reason for hiding this comment

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

Org reading was enough friction from getting the Facebook OSPO from using the original open-sauced/open-sauced.

This is partly why installing the GitHub app is the path we should introduce for progressively getting access to more read only data (in the near future).

I believe the onboarding screen has a note about reading public data only. If not, it should.

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes @brandonroberts! πŸš€

Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

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

Email copy. Should be set up when we release this to production.

https://github.com/open-sauced/etl/issues/117

@brandonroberts
Copy link
Contributor Author

I wonder if we can force a logout of all users also?

@nickytonline
Copy link
Member

nickytonline commented Oct 26, 2023

I think this would be the right way to go since it's a one click login since most people are logged in to GitHub already.

If you change the Supabase JWT secret, that should do it. All existing tokens should become invalid.

@jpmcb
Copy link
Member

jpmcb commented Oct 26, 2023

I wonder if we can force a logout of all users also?

+1 - that would be ideal. Starting a thread with the engineers internally to get this coordinated.

@brandonroberts brandonroberts merged commit 3113a74 into beta Oct 26, 2023
12 checks passed
@brandonroberts brandonroberts deleted the feat-github-team-import branch October 26, 2023 20:50
open-sauced bot pushed a commit that referenced this pull request Oct 26, 2023
## [1.74.0-beta.1](v1.73.0...v1.74.0-beta.1) (2023-10-26)

### πŸ• Features

* add GitHub team import to new list page ([#2006](#2006)) ([3113a74](3113a74))
@nickytonline nickytonline mentioned this pull request Oct 27, 2023
20 tasks
open-sauced bot pushed a commit that referenced this pull request Nov 6, 2023
## [1.74.0](v1.73.0...v1.74.0) (2023-11-06)

### πŸ• Features

* add account deletion flow ([#1990](#1990)) ([daeb10e](daeb10e))
* add contributor's when editing a list ([#2016](#2016)) ([1a0b4da](1a0b4da))
* add GitHub Org Repositories sync to insight page creation ([#2023](#2023)) ([e5f38ac](e5f38ac))
* add GitHub team import to new list page ([#2006](#2006)) ([3113a74](3113a74))
* add grey background for delete account ([#2030](#2030)) ([ea10161](ea10161))

### πŸ› Bug Fixes

* add check to allow team member access for private insight pages ([#2049](#2049)) ([2e48b95](2e48b95))
* change avatar alignment with highlight input ([#2032](#2032)) ([dc409c4](dc409c4))
* change label style of bio to bold ([#2033](#2033)) ([647fca3](647fca3))
* chart tooltip cut in contributors card ([#2029](#2029)) ([7c16863](7c16863))
* code standard errors ([e93bdca](e93bdca))
* don't recommend discordapp & use user's full id ([c5cad45](c5cad45))
* don't recommend discordapp as url & use user's full id ([#2014](#2014)) ([58df997](58df997))
* dropdown flickery on single highlight card ([#2040](#2040)) ([672ce2f](672ce2f))
* eslint issue by using `eslint-disable` ([#1993](#1993)) ([bc285a2](bc285a2))
* made notifications buttons more accessible ([#2034](#2034)) ([50bcf9d](50bcf9d))
* occurence eslint disable ([3d84665](3d84665))
* remove build commands from netlify.toml ([#2018](#2018)) ([138a125](138a125))
* ToggleSwitch component has required label via aria-label or aria-labelledby ([#2035](#2035)) ([0684081](0684081))
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.

None yet

5 participants