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

Fetch accessible repositories on installation #26

Open
a-warner opened this issue Aug 20, 2020 · 0 comments
Open

Fetch accessible repositories on installation #26

a-warner opened this issue Aug 20, 2020 · 0 comments

Comments

@a-warner
Copy link
Owner

Looking into this deprecation notice which I keep getting emails about, it turns out preflight doesn't actually listen to those webhooks.. great news!

Unfortunately preflight really should be listening to those webhooks in order to figure out what repositories it, and the users who use it, have access to. At the moment we sync accessible repositories, in order to populate the dropdown for new checklists, when users log in to preflight. This ends up working out ok because the only time we care about preflight getting access to new repositories is when a user logs in to add a checklist to that repository anyway. But nevertheless it feels a little icky, and there are undoubtedly a bunch of edge cases that this approach doesn't handle.

The "right" thing to do here is probably to listen to these installation and installation_repositories events, and update accessible repositories at that time. Sadly we still need to keep track of repositories the user has access to, the simplest way being to continue to fetch them on login, in order to not show them only repositories they have access to the in dropdown.

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

No branches or pull requests

1 participant