This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Loading projects with associated push access was slow because the backend process
was making many requests to the GitHub API each time. Now, which repos a user
has access to is stored in a new database table. When a user logs in with GitHub,
their list of repo access is updated. Both /admin/projects and /studio have a button
that users logged in with GitHub can click to trigger the same behavior. Also added
a route for GH webhooks to trigger this re-fetch when a user is added/modified/removed
as a collaborator on a repo or an organization. Support for changes to teams is not
included because getting the list of users in a team is tricky.
Fixed an issue with users not being able to update a project from GitHub if they were
not part of the organization that owned the repo. This was leftover thinking from GitHub
Apps, which required Org access, and instead the backend check now gets the users allowed
repos instead.
Replaced some useState's with useHookstate's.
Updated the studio projects page to determine display of most projects' actions via the
same method as the admin projects page.
References
closes #7532 #7547
Checklist
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.