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

Use installation tokens instead of user tokens to access repositories #52

Open
suprnova32 opened this issue Sep 11, 2018 · 0 comments
Open

Comments

@suprnova32
Copy link
Member

Related to #51

Right now we are accessing the repositories to show under New Project via the user's OAuth token. This has the following implications:

  • Repos from organizations that have restricted access will not show up until authorized
    • Once authorized, the repos will show up, but if AlloyCI is not installed in that organizations, the user will not be able to add the repos, and will get an error message. This is confusing and frustrating.
  • Repos from organizations without restricted access will show up, but if AlloyCI is not installed, the same error as above happens.
  • Users see a lot of repos that can not be added to AlloyCI

This is a really bad user experience and we need to fix it.

Using installations tokens will allow us to show only repos from organizations that have been authorized to use AlloyCI, and that already have AlloyCI installed, thus avoiding the annoying error messages.

Problem: Need to figure out a good UI/UX for this
Possible solutions:

  • Use the existing UI, and handle which repos to show in the backend.
  • Redesign New Project view


Handle showing of repos in the backend

  • Fetch orgs to which the user has access
  • Match these orgs to orgs that have AlloyCI installed
  • Use the installation tokens from these matches to fetch repos, on an org by org basis
  • Join maps and send to client


Redesign View

  • Show orgs the user can access, and show installation status
  • Allow the user to install AlloyCI in orgs that don't have it
  • User selects and org, and we fetch said orgs repos
  • User can only see this orgs repos and add them without further steps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant