Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

7532 project info split #7596

Merged
merged 1 commit into from
Feb 16, 2023
Merged

7532 project info split #7596

merged 1 commit into from
Feb 16, 2023

Conversation

barankyle
Copy link
Member

@barankyle barankyle commented Feb 16, 2023

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

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

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.
@speigg speigg added this pull request to the merge queue Feb 16, 2023
Merged via the queue into dev with commit ec1e8b8 Feb 16, 2023
@speigg speigg deleted the 7532-project-info-split branch February 16, 2023 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants