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

Organization onboarding #5201

Merged
merged 93 commits into from
Nov 14, 2024
Merged

Organization onboarding #5201

merged 93 commits into from
Nov 14, 2024

Conversation

colby-swandale
Copy link
Member

@colby-swandale colby-swandale commented Nov 5, 2024

What's this about?

In #4859, we added Organizations to rubygems.org to allow teams and businesses to manage their gems and users under a single umbrella. This Pull Request is the next major part of the work to add Organizations, allowing users to migrate their gems to an Organization.

Introducing Organization Onboarding!

Details

This Pull Request adds a new model called Organization Onboarding that collects organization field, like name and handle, gems (which the user must be an owner of), and users+roles (who must have ownership of the selected gems).
When the user has confirmed all information, the Onboarding then performs the following steps:

  • Links the selected RubyGems to the Organization
  • Creates Membership records that link a User to an Organization
  • Creates the Organization
  • Removes the previously held Ownership records

Notables

  • One of the selected roles for Users is an Outside Collaborator. This is not a role and is, in fact, an option a user can select to ask for the user to not be added to the Organization.
  • We initially introduced the concept of a Team & Team Members, but this has been removed for now and will circle back in the near future.

Screenshots

initial screen to set the name of the organization

Screenshot 2024-11-14 at 2 22 13 AM

gem selection screen
Screenshot 2024-11-14 at 2 27 50 AM

user & role selection screen
Screenshot 2024-11-14 at 2 28 01 AM

final confirmation screen
Screenshot 2024-11-14 at 2 28 14 AM

_

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 98.13665% with 6 lines in your changes missing coverage. Please review.

Project coverage is 96.85%. Comparing base (1e5c287) to head (5e639e8).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
app/policies/membership_policy.rb 85.71% 2 Missing ⚠️
...llers/organizations/onboarding/users_controller.rb 92.85% 1 Missing ⚠️
...ies/admin/organization_onboarding_invite_policy.rb 90.00% 1 Missing ⚠️
...p/policies/admin/organization_onboarding_policy.rb 90.90% 1 Missing ⚠️
app/views/components/button_component.rb 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5201      +/-   ##
==========================================
+ Coverage   96.76%   96.85%   +0.09%     
==========================================
  Files         437      456      +19     
  Lines        9238     9511     +273     
==========================================
+ Hits         8939     9212     +273     
  Misses        299      299              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Gemfile Outdated Show resolved Hide resolved
Copy link
Member

@martinemde martinemde left a comment

Choose a reason for hiding this comment

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

I looked over everything and I only see a few little things to fix or check.

app/models/rubygem.rb Show resolved Hide resolved
app/models/organization.rb Outdated Show resolved Hide resolved
@colby-swandale colby-swandale changed the title 🚧 Organization onboarding Organization onboarding Nov 13, 2024
@colby-swandale colby-swandale marked this pull request as ready for review November 13, 2024 16:20
Copy link
Member

@martinemde martinemde left a comment

Choose a reason for hiding this comment

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

💪

colby-swandale and others added 21 commits November 14, 2024 16:33
onboard gems

Update avo resource to v3

update enum syntax

Add methods for fetching rubygems & users

Add user relationship between OrganizationOnboarding and User
Add onboarding base controller

Fixup namespace

Cleanup routes

Set title field

Multi select gems form

Fix styling

Add integration test for users

Add test for confirmation controller

Don’t render onboarding routes in Staging or Production
fixup breaking tests

number of tweaks

small tweaks

tweak forms

Fixup breaking tests

tweak forms
default to open permissions matrix
@colby-swandale colby-swandale merged commit 4aa3425 into master Nov 14, 2024
19 checks passed
@colby-swandale colby-swandale deleted the colby/organization-onboarding branch November 14, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants